Statalist


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

st: puzzling sqreg behavior, possible solution


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

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 example, when you run

#delimit;
webuse auto, clear;
sort rep78;
/* sort foreign; */
set seed 123456789;
sqreg price mpg, q(.25 .5 .75);
test [q25]mpg=[q50]mpg=[q75]mpg;

you get different F statistic and p-value each time. When you sort by
foreign, you get the same answer each time. Is there a way around this
so that you get the same standard errors each time you run the
do-file?

DVM

*
*   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