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?
spatial econometricsHi everyone Someone knows how to run the LMlambda, LMlambda ROBUST LMrho LMrho ROBUST ? What is co…
Simple info on combomarginsplotDear Stata users, I would like to know whether there is an option of combomarginsplot that allows m…
Reshape to Long-Firm Year Panel - Data in Multiple excel files and multiple worksheetsHi, I'm quite new to Stata so I am in a bit of a pickle. I need to get a long format firm-year pane…
Aidsills with market fixed effectsDear Statalisters, I am using Stata ver 14, and the built in command aidsills written by Lecocq and…
Lagged variables of daily dataHi, I have a dataset of stock returns, with daily returns (panel). I have successfully created runn…
Subscribe to:
Post Comments (Atom)
0 Response to Two loop of foreach: How to outreg2?
Post a Comment