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
GEE: results significant only with independent and exchangeable correlation structureHello there! I am trying to fit a GEE Poisson model on a panel dataset consisting of T=360 and N=30…
Different number of decimals for different scalars in esttabHello! I am adding several scalars to my regression table and want different numbers of decimals fo…
What is the best method to test these relationships with Stata? Multiple regression? SEMDear all, I hope you can give me your opinion about this. I have to test the following relationship…
Measuring Spells - two special cases in panel dataHi Statalist. I have code to identify and measure the length of a spell - the spell relates to coup…
DOS windows how to remove itDear all, My question will be quite simple I think but I just need to know if my wish could be real…
Subscribe to:
Post Comments (Atom)
0 Response to Loop
Post a Comment