Dear all, I am tabulating different dependent variables in consecutive rows (not consecutive columns as it is the default for esttab) and I'm keeping only one explanatory variable. I want two columns per model, one with few controls, the other one with more controls. I'm using the option "appendmodels" so every dependent variable is showed in a row. I would like the explanatory variable I'm keeping to have the label/name of the dependent variable. I have tried to use rename and change the label of the explanatory variable every time I run the regression but it keeps only the last change and not a different label for each regression. See an example of what I'm doing below. I have three different rows with the variable foreign, but I want instead the name of the dependent variable used in each specification. In the example I would like to change "foreign" for the name of the dependent variables (price and weight). Any help would be appreciated. Thanks, Lina.
sysuse auto, clear
eststo r1: reg price foreign
eststo r2: reg price foreign head
eststo r3: reg weight foreign
eststo r4: reg weight foreign head
eststo nocontrols: appendmodels r1 r3
eststo controls: appendmodels r2 r4
esttab controls nocontrols, replace keep(foreign)
Related Posts with esttab, eststo and appendmodels
import data from excel to stata-change the structure of the dataHi, I have a data file in excel which includes more than 300 firms. Information for each firm inclu…
Syntax for lincom won't work in Stata 16 but works fine in Stata 15Hello all. I'm a professor at Baldwin Wallace. On Thursday, I tried to run a lab with my class from …
How to tag outliers?Hi, I would like to create a dummy that's equal to 1 if it's an outlier, and 0 if not. I can use -ex…
Proportion experiencing event under competing-risks regressionHi, I am looking at the results of a three-arm clinical trial, where a secondary outcome is the occ…
Separating cumulative data into actualsHi all First of all, apologies if I am not able to explain this very well. I am very new to Stata a…
Subscribe to:
Post Comments (Atom)
0 Response to esttab, eststo and appendmodels
Post a Comment