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
Propensity score matching commandHello everyone, i want to use propensity score matching for impact evaluation. I used these ado comm…
Difference in Difference in Matching by incorporating geographical fixed effectsDear All, I would like to ask about matching. If I have a panel data and I want to run Difference i…
how to create a factor variable in this case? and what is a threshold?Create factor variable “pop_fact” out of population, consisting of three categories: low populated, …
Option for mass replace instead of manually replacing many string variablesHello Statalisters, I want to merge two datasets using two string identifiers i.e. name of state an…
Help Interpreting Continuous Dummy Interaction Term in Fixed Effects Panel dataDear all, I have a question on how to interpret an interaction between a continuous and dummy varia…
Subscribe to:
Post Comments (Atom)
0 Response to Loop
Post a Comment