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

From |
"Maarten Buis" <M.Buis@fsw.vu.nl> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: Standard error of the estimate for reg |

Date |
Fri, 31 Aug 2007 13:10:54 +0200 |

--- Eva Batistatou wrote: > I run some simulations and after regression analysis on 5,000 simulated > datasets,I calculate the mean slope b and mean standard error of b's.We know > that the mean SE(b)=standard deviation(b1,...,b5000).However,when instead of > reporting the mean SE,I calculate the SD of b's,I find different results.Is it > possible that this has to do with how STATA calculates the standard errors?? On possibility you have to take into account that simulations contain a random component, so what you see may be the result of that. One way to get a grip on that is to simulate the simulations, as is shown in the example below. This example indicates that although the two statistics can differ in individual simulations, there does not seem to be any systematic difference between the two, indicating that these differences are just due to the randomness of the simulation process. *-------------- begin example ------------------- capture program drop Sim program define Sim, rclass drop _all set obs 500 gen x = invnorm(uniform()) gen y = x + invnorm(uniform()) reg y x return scalar b = _b[x] return scalar se = _se[x] end capture program drop Simsim program define Simsim, rclass simulate b = r(b) se=r(se), reps(500) : Sim /*Mean of se should be close to Std. Dev. of b*/ sum b tempname bsd scalar `bsd' = r(sd) sum se return scalar diff = r(mean) - `bsd' end simulate diff = r(diff), reps(500) : Simsim sum diff kdensity diff *---------------- end example ------------------- (For more on how to use examples I sent to the Statalist, see http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html ) Hope this helps, Maarten ----------------------------------------- Maarten L. Buis Department of Social Research Methodology Vrije Universiteit Amsterdam Boelelaan 1081 1081 HV Amsterdam The Netherlands visiting address: Buitenveldertselaan 3 (Metropolitan), room Z434 +31 20 5986715 http://home.fsw.vu.nl/m.buis/ ----------------------------------------- * * 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/

- Prev by Date:
**st: Standard error of the estimate for reg** - Next by Date:
**Re: st: Standard error of the estimate for reg** - Previous by thread:
**st: Standard error of the estimate for reg** - Next by thread:
**st: Stata plugin interface: what's the license?** - Index(es):

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