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
panel data analysisHi, I am getting negative test statistic for hausman test to check b/w random and fixed effects mode…
Visual representation of cases and their contactsHello All, I have a dataset of individuals that were infected with a virus (one row for each indivi…
Reorganising panel dataI have Panel data ranging over 8 time periods (quarters). For each individual, there are 4 quarters…
Plotting by subgroupsHi, I am Soma Gecse, an Economics student from Warwick University. With my group, we are investiga…
GMM Standard Errors and SAR ModelsAll: Please excuse this question as I am an ex-GeoDa user coming to STATA. In the Spatial Autoregre…
Subscribe to:
Post Comments (Atom)
0 Response to Outreg2 in a loop and table title
Post a Comment