Hello everyone,
I am working in a 2SLS estimation by instrumental variables with cross-country data. Especifically, we are interested in comparing how 3 types of instruments perform differently in each stage of the regression under different especifications, but what we want to compare is the performance (p-value, coefficient, F-test, R-squared of the regression) for the instrument in the first stage, and then of the endogenous variable (p-value, coefficient, adjusted R-squared of the regression) in the second stage.
I am familiar with the esttab command that allows to compare a regression under different especifications reporting the coefficientes and p-values of each variable in a simple regression, like this:
quiet reg euro1900 settlerpotential latitude, cluster(latitude)
estimate store Euro1
quiet reg euro1900 settlerpotential latitude landlock temp1 humid1, cluster(latitude)
estimate store Euro2
quiet reg euro1900 settlerpotential latitude landlock temp1 humid1 f_brit f_french, cluster(latitude)
estimate store Euro3
cd "$tables"
esttab Euro1 Euro2 Euro3 using Table111.rtf, se r2 replace label
However, we would like to compare not the regression models but rather the behavior of a specific variable in those regressions (and under different especifications). I have been reading about how to do more complex comparative tables of regressions by using command and collect, but it seems that all these comparisons are always at the level of the regression model and can not combine statistics of the regression as a whole (like the R-squared) and of specific variables (like its p-value and coefficient).
Thus, what I expect is to get a table that looks something like this, and analogous for the second stage of the regression. Moreover, we have 3 versions of the endogenous variable and would need to repeat the exercise of this table for all of those.
Is there any way to produce such a table? Maybe by first building a matrix and then getting some content of that matrix into a table? Or some kind of loop?
I have been running ivregress 2sls and manually copying this specific information into comparative tables myself (with estat firststage to get the information of the F-test) but I have been ordered to find a way to automatize this process so is straightforward to update if we change details of the regressions.
I hope I explained my inquiry clearly. Thank you very much in advance
I am working in a 2SLS estimation by instrumental variables with cross-country data. Especifically, we are interested in comparing how 3 types of instruments perform differently in each stage of the regression under different especifications, but what we want to compare is the performance (p-value, coefficient, F-test, R-squared of the regression) for the instrument in the first stage, and then of the endogenous variable (p-value, coefficient, adjusted R-squared of the regression) in the second stage.
I am familiar with the esttab command that allows to compare a regression under different especifications reporting the coefficientes and p-values of each variable in a simple regression, like this:
quiet reg euro1900 settlerpotential latitude, cluster(latitude)
estimate store Euro1
quiet reg euro1900 settlerpotential latitude landlock temp1 humid1, cluster(latitude)
estimate store Euro2
quiet reg euro1900 settlerpotential latitude landlock temp1 humid1 f_brit f_french, cluster(latitude)
estimate store Euro3
cd "$tables"
esttab Euro1 Euro2 Euro3 using Table111.rtf, se r2 replace label
However, we would like to compare not the regression models but rather the behavior of a specific variable in those regressions (and under different especifications). I have been reading about how to do more complex comparative tables of regressions by using command and collect, but it seems that all these comparisons are always at the level of the regression model and can not combine statistics of the regression as a whole (like the R-squared) and of specific variables (like its p-value and coefficient).
Thus, what I expect is to get a table that looks something like this, and analogous for the second stage of the regression. Moreover, we have 3 versions of the endogenous variable and would need to repeat the exercise of this table for all of those.
Is there any way to produce such a table? Maybe by first building a matrix and then getting some content of that matrix into a table? Or some kind of loop?
I have been running ivregress 2sls and manually copying this specific information into comparative tables myself (with estat firststage to get the information of the F-test) but I have been ordered to find a way to automatize this process so is straightforward to update if we change details of the regressions.
I hope I explained my inquiry clearly. Thank you very much in advance
Comment