Dear Statalisters,
I am trying to figure out how to generate a latex table with my stored coefficients in a particular way. I would like to run regressions on first-difference (FD) and on fixed effects (FE) and display the estimated coefficients in a way that makes it easier to compare them. Hence, each column would have coefficients for regressions with the same specification in terms of controls, while each line would have coefficients obtained from the same "method" (FD or FE). Making myself clear, the table below illustrates what I am trying to do.
(1) has no controls
(2) has temperature (or the first-difference of temperature) as a control
(3) has temperature and rain (or the first-difference of temperature and rain) as controls
By the way, I was planning to use keep() or any similar option in order to only display the coefficient I am interested in.
In order to estimate the coefficients I have written a loop where I get the regressions I need done. and then I store the coefficients using different "names". For instance eststo bet_fe1 or eststo bet_fd1. I have been trying to generate a table like the one above by esttab, but could not figure out how to do it (if i just write esttab bet_fe* bet_fd* I do not have the coefficients displayed in the manner I want as the stored coefficients will be shown kinda* one next to other). I am open to solutions that do not use the esttab command or that require changes in my code, though. My guess is that I would have to find an option that would break the first line of estimates after the third estimate (hence, the title of my post).
*As I am doing FE and FD i don't have the same dependent and independent variables, so they are not really on next to the other, but they are definety not shown one below the other.
Thanks for the help,
Roberto
I am trying to figure out how to generate a latex table with my stored coefficients in a particular way. I would like to run regressions on first-difference (FD) and on fixed effects (FE) and display the estimated coefficients in a way that makes it easier to compare them. Hence, each column would have coefficients for regressions with the same specification in terms of controls, while each line would have coefficients obtained from the same "method" (FD or FE). Making myself clear, the table below illustrates what I am trying to do.
(1) | (2) | (3) | |
Beta FE | 0.1 | 0.2 | 0.3 |
Beta FD | 0.05 | 0.03 | 0.09 |
(2) has temperature (or the first-difference of temperature) as a control
(3) has temperature and rain (or the first-difference of temperature and rain) as controls
By the way, I was planning to use keep() or any similar option in order to only display the coefficient I am interested in.
In order to estimate the coefficients I have written a loop where I get the regressions I need done. and then I store the coefficients using different "names". For instance eststo bet_fe1 or eststo bet_fd1. I have been trying to generate a table like the one above by esttab, but could not figure out how to do it (if i just write esttab bet_fe* bet_fd* I do not have the coefficients displayed in the manner I want as the stored coefficients will be shown kinda* one next to other). I am open to solutions that do not use the esttab command or that require changes in my code, though. My guess is that I would have to find an option that would break the first line of estimates after the third estimate (hence, the title of my post).
*As I am doing FE and FD i don't have the same dependent and independent variables, so they are not really on next to the other, but they are definety not shown one below the other.
Thanks for the help,
Roberto
Comment