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
Coefplot: keep / drop coefficients from one model, not the whole plotDear Statalist, I've recently started using coefplot command and like it's versatility, but I canno…
Help on Generating a new variable that combines 2 variablesHi, I have the attached dataset which I have imported from Excel into Stata. I haven't made any ch…
Generating and exporting a table to excel which counts the number of category types in each variableHello! I am trying to make a table that shows the number of instances of each type of missing values…
'' xthenreg'' for dynamic threshold modelsDear all it has been 8 months now since we got the new stata command for a dynamic threshold model …
Extracting the first number from a numeric variable into a new variableHi, I would like to extract the first number of another variable into a new variable. (And an addit…
Subscribe to:
Post Comments (Atom)
0 Response to Outreg2 in a loop and table title
Post a Comment