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?
Graph that show number of specific variable observationsHi, I’m trying to create a graph showing how many non-married individuals paid taxes each year and…
How to identify missing values in the next period (panel data)Dear all, I have a four-wave panel data and I am looking for a way to identify missing values of ag…
Lincom test Weibull analysis with dummyXdummy interactionDear all, I searched for the forum for a solution to my problem and tried some fixes already, the is…
Proper display of foreign language (Arabic/Urdu - Right to Left) using Stata 16Hello everyone, Hope everything is well. I have come across this rather possibly minor problem whi…
xtabond2 - missing Wald Chi2 under nocons optionDear Statalist community, I am using Stata 13 and run xtabond2. When running xtabond2 with nocons o…
Subscribe to:
Post Comments (Atom)
0 Response to Two loop of foreach: How to outreg2?
Post a Comment