Hi,
I am looking to create a custom table that exports my results from a linear regression automatically to prevent manual work since I have a lot of variables. I am using the FOREACH COMMAND to run all the regressions at once but I don't know how to get them onto a table like the one below. Any help is appreciated.
sysuse auto.dta
foreach var of varlist price mpg rep78 headroom trunk weight length turn displacement gear_ratio{
regress `var' i.foreign
}
I am looking to create a custom table that exports my results from a linear regression automatically to prevent manual work since I have a lot of variables. I am using the FOREACH COMMAND to run all the regressions at once but I don't know how to get them onto a table like the one below. Any help is appreciated.
sysuse auto.dta
foreach var of varlist price mpg rep78 headroom trunk weight length turn displacement gear_ratio{
regress `var' i.foreign
}
Variable | Coefficient | 95% CI | P-value |
Mpg | 4.95 | 2.23 – 7.66 | 0.001 |
Rep78 | 1.26 | 0.84 – 1.68 | <0.001 |
Comment