Hello
I have a panel data of ten 9 countries, I want to run this code for the pair of 4 countries (all possible combinations)
how I can do that please
foreach dep_var in dep_var_1 dep_var_2 dep_var_3 dep_var_4 {
xi: areg `dep_var' independent_var_1 independent_var_2, robust absorb(group_id) cluster(group_id)
sum `dep_var' if e(sample) & independent_var_1 == 0
outreg2 using output_file, excel dec(3) addstat(Mean of Dep Variable, r(mean)) keep(independent_var_1 independent_var_2)
}
and name the outreg file as C1_C2_C3_C4
I want to check how the results are changed if we select the different set of countries
Thanks
Related Posts with Loop
logout nicely formatted tablesDear all, I want to export table in Excel, but to have nice and funcional table. I have categorical…
rowmiss Dear Stata user, I will create mean scores for a selection of variables, an I need to take into acc…
osrmtime, traveltime, geocodeDear All, I'm new in this forum, but I've been using the software for quite a time. I'm trying to ca…
Panel logistic regression verificationHi ; I have some questions maybe somebody can help me about them. I am studying on Panel data Logis…
Insignificant values (p>0.05)My values are insignificant (p>0.05). I am very new to stata so my knowledge is limited. Excuse m…
Subscribe to:
Post Comments (Atom)
0 Response to Loop
Post a Comment