Hello everyone,
I am facing an issue with the outreg2 command. So I am trying to run a loop like this:
local name3 "jcissue jc_sc jc_st jc_gen personwrk_allot hh_wrkd person_wrkd schh_wrkd sthh_wrkd persondgen_wrkd scpersond_wrkd stpersond_wrkd wpersond_wrkd persond labexp_disb matexp_disb labexp_dp matexp_dp"
foreach name3 in jcissue jc_sc jc_st jc_gen personwrk_allot hh_wrkd ///
person_wrkd schh_wrkd sthh_wrkd persondgen_wrkd scpersond_wrkd ///
stpersond_wrkd wpersond_wrkd persond labexp_disb matexp_disb ///
labexp_dp matexp_dp {
bysort year: regress `name3' cpgender if year==2011, vce(cluster blockid)
outreg2 using ols.xls, bdec(3) excel ctitle("`name3'", "2011", "Gender only") append
}
Basically what I would like is to is to have all the regression tables for each of the years compiled in an excel file. The problem is the table created by outreg2 is only showing table for the first year and not the subsequent ones. I can run regression for separate years but that will be time consuming. Could you please help?
Another issue that I am facing is that I would like each of the year regressed on to appear as a column title or notes, whichever is possible. So far I have tried multiple commands but nothing is working out. Please advise me on this.
Related Posts with Outreg2 in a loop and table title
How to use -tuples- to do model selection?@Nick CoxDear all, I want to use -tuples- to do model selection.My code is here, Code: webuse grunfeld,clear…
Precalc following logit: 'No variation in predicted dependent variable! All values are 0.'Greetings, I'm running Stata 15.1 on a Mac OS and working with cross-sectional survey data. I'm try…
Multinomial model with selectionI am attempting to estimate a multinomial logit/probit model for how a rebate is used. There are thr…
clogit command for cross-sectional dataHello, I am wondering if I can use "clogit" command for cross-sectional data. When I searched "help…
Combining linear graph with scatter graph for panel dataHello, I would like to create one graph that combines two graphs - one linear and one scatter graph…
Subscribe to:
Post Comments (Atom)
0 Response to Outreg2 in a loop and table title
Post a Comment