Hi, I have a problem with the outreg2-command. The requirement is that I have to create an Excel table to incorporate all results obtained from the two loops below in 1 table. The loops are as follows:
eststo clear
foreach var in budget_health budget_defense {
eststo: xi: reg `var' q1_to_q1 `Controls'
}
outreg2-command using 2a, excel nocons
foreach var in budget_health budget_defense {
eststo: xi: reg `var' q1_to_q5 `Controls'
}
outreg2-command using 2a, excel nocons
I have tried to add outreg2 at the end of each command but it does not work. For example, with the 1st loop, it only records the results of budget_health with q1_to_q1 on the table, without the result of budget_defense. Same as for the second loop. Can anyone help me with this issue? Thank you so much!
eststo clear
foreach var in budget_health budget_defense {
eststo: xi: reg `var' q1_to_q1 `Controls'
}
outreg2-command using 2a, excel nocons
foreach var in budget_health budget_defense {
eststo: xi: reg `var' q1_to_q5 `Controls'
}
outreg2-command using 2a, excel nocons
I have tried to add outreg2 at the end of each command but it does not work. For example, with the 1st loop, it only records the results of budget_health with q1_to_q1 on the table, without the result of budget_defense. Same as for the second loop. Can anyone help me with this issue? Thank you so much!
Comment