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