Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: puzzling sqreg behavior, possible solution


From   "Dimitriy V. Masterov" <[email protected]>
To   [email protected]
Subject   Re: st: puzzling sqreg behavior, possible solution
Date   Fri, 19 Oct 2007 19:09:54 -0400

Thanks to Austin Nichols for the solution. Using the stable option
with sort does the trick. In my code, above the sqreg, I actually had

bysort treat: sum x*;

If one were to rewrite this as

sort treat, stable;
by treat: sum x*;

the bootstrapped errors would be identical each time you ran the do-file.

DVM

On 10/19/07, Austin Nichols <[email protected]> wrote:
> Dimitriy V. Masterov <[email protected]>:
> -sort- has a -stable- option; see -help sort-
> and set the seed before sorting
>
> On 10/19/07, Dimitriy V. Masterov <[email protected]> wrote:
> > When you sort by a variable with ties, the random number generation is
> > changed, which changes the bootstrapped standard errors each time you
> > run the do-file.
> >
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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