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

From |
Maarten buis <maartenbuis@yahoo.co.uk> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: AW: RE: st: RE: mim: reg command |

Date |
Tue, 20 Oct 2009 07:57:25 +0000 (GMT) |

-------------------------- Maarten L. Buis Institut fuer Soziologie Universitaet Tuebingen Wilhelmstrasse 36 72074 Tuebingen Germany http://www.maartenbuis.nl -------------------------- --- On Tue, 20/10/09, Martin Weiss wrote: > " Can I ask, what does the code "local m= r(max)" and > "forvalues j = 1/`m' " > mean in that command?" > > > > Yes, you can. The first one stores the maximum calculated > by the line -sum _mj, meanonly- in a -local- macro so as > to make it accessible after other commands have > overwritten the returned values of the -summarize- command. > The second one lets Stata loop from a fixed starting point > of "1" to this very maximum stored by the -local- in "m", > in increments of 1... That is correct. To expand a bit on that in the context of -ice-: _mj identifies each imputed dataset, where _mj=0 represents the original dataset with missing values, _mj=1 the first imputed dataset, _mj=2 the second, etc. So, the maximum of _mj represents the total number of imputed datasets. In the loop I loop over the imputed datasets, calculate the regression in each of them, and add up the log(r2). After the loop I divide by the number of imputed datasets (still stored in the local `m') and exponentiate it again. -- Maarten * * 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/

**References**:**AW: RE: st: RE: mim: reg command***From:*"Martin Weiss" <martin.weiss1@gmx.de>

- Prev by Date:
**AW: RE: st: RE: mim: reg command** - Next by Date:
**st: Event Study Methodology using a GARCH Model** - Previous by thread:
**AW: RE: st: RE: mim: reg command** - Next by thread:
**Re: st: re: Error with MIM installed command** - Index(es):

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