Could you kindly help me?
I try to produce regression using three different variables (physical contact ict) by each country. Using the command below, I could produce regression tables for "physical" in each country, but could not produce ones for "contact" and "ict".
What are the issues here?
In addition, I would like to see all the outputs in one sheet in the Excel sheet. Are there any ways to do so?
foreach var in physical contact ict {
foreach i in Egipt Algeria Jordan Lebanon {
estimates store `var', title(`i'_`var')
reg `var' i.gender i.college i.age_group i.emptype [w=weigh1] if country == `i'
estout `var', cells(b(star fmt(3)) se(par fmt(2))) ///
legend label varlabels(_cons constant) ///
stats(r2 df_r bic, fmt(3 0 1) label(R-sqr dfres BIC))
outreg2 using "C:\Users\----\country`i'_`var'.xls", replace excel
}
}
Related Posts with Two loop of foreach: How to outreg2?
Compare betas of two different models while using asdoc and reghefe Code: asdoc reghdfe pm rc l.pm interaction1 l.asse /// l.lev if dummy ==0, absorb(cc industry_year_…
graph x-axis with year and month?Dear All, I use the (ssc install) -synth- command to tun the following regression Code: xtset id da…
Multiple "lincoms" after "margins" with "at"?Goal: I want to subtract the results of "margins" from a constant. My approach: Use margins with "a…
Estimating ARDL with Structural Break Hi.... My data is stored in a panel data format. I want to estimate the ARDL with a structural brea…
Compare similarity of structure (percentage distribution) for one conditionHello guys, I hope someone here can help me with my stata problem. I want to find out if the structu…
Subscribe to:
Post Comments (Atom)
0 Response to Two loop of foreach: How to outreg2?
Post a Comment