Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: bootstrap within the command


From   Scott Merryman <scott.merryman@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: bootstrap within the command
Date   Mon, 7 Sep 2009 07:31:32 -0500

Le,

Can you send me an example where this occurs.    At least with auto
data set example below, -set seed- appears to work:

. sysuse auto,clear
(1978 Automobile Data)

. replace mpg = 17 if mpg <17
(14 real changes made)

. set seed 12345

. cqreg2 mpg price gear, ll(17) bs reps(20)
(fitting base model)
(bootstrapping ....................)

Median regression, bootstrap(20) SEs                 Number of obs =        59
  Raw sum of deviations      239 (about 22)
  Min sum of deviations 176.8206                     Pseudo R2     =    0.2602

------------------------------------------------------------------------------
         mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       price |   -.001039   .0008948    -1.16   0.251    -.0028314    .0007535
  gear_ratio |    6.49799   1.870249     3.47   0.001     2.751431    10.24455
       _cons |   6.274038   5.979655     1.05   0.299     -5.70465    18.25273
------------------------------------------------------------------------------

. set seed 12345

. cqreg2 mpg price gear, ll(17) bs reps(20)
(fitting base model)
(bootstrapping ....................)

Median regression, bootstrap(20) SEs                 Number of obs =        59
  Raw sum of deviations      239 (about 22)
  Min sum of deviations 176.8206                     Pseudo R2     =    0.2602

------------------------------------------------------------------------------
         mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       price |   -.001039   .0008948    -1.16   0.251    -.0028314    .0007535
  gear_ratio |    6.49799   1.870249     3.47   0.001     2.751431    10.24455
       _cons |   6.274038   5.979655     1.05   0.299     -5.70465    18.25273
------------------------------------------------------------------------------

Scott



On Sun, Sep 6, 2009 at 8:43 PM, Le Wang<statauser@gmail.com> wrote:
> Thanks, Scott.
>
> I did try set seed before calling -cqreg2-, but it didn't work, either.
>
> Le
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index