Hi,
I am using Stata 15 and I am having trouble getting estimates of a series of regressions with Outreg2. I am storing the estimates for each regression, but when I run outreg2 all the estimates are replaced by those of the last regression.
Here is my code:
#levelsof year, local(lev)
foreach i of local lev {
reg lh lw lnlincr yoe pexp pexp3 p03 age3 nchild nchild6 i.prov, vce (robust)
estimates store m`i'
}
outreg2 [m2007 m2008 m2009 m2010 m2011 m2012 m2013 m2014 m2015 m2016 m2017] using "C:\XXXX\file.doc", stats(coef se) word replace #
Thanks in advance for your help,
David
Related Posts with Outreg2 after a loop
Error = { required r(100)Greetings Please attached is my do file that I am trying to use to test associations between my expl…
ivreg2 and ivregress provide different resultsDear, I have used two commands, ivreg2 and ivregress, to estimate the same model. errors are assume…
Global macro before stringsDear, I would like to generate a new variable whose name includes a global macro in the middle of s…
Country fixed effects and dummy in IV regressionHello everyone, I want to use instrumental Variable regression and include country fixed effects in…
Network meta-analysisHello all, I'm trying to run network meta-analysis in Stata and I'm running into a problem that mig…
Subscribe to:
Post Comments (Atom)
0 Response to Outreg2 after a loop
Post a Comment