Say I run a model with time series operators lagging each of two independent variables, listed in a macro, and store the estimates to generate a coefficient plot of just one of the varaibles:
You should see that the first two coefplot commands cannot find any coefficients, while the final command only plots the first coefficient even though (I think) the syntax should produce plots for both (when the coefplot command includes a macro with multiple selected variables, it still plots only the first variable). Also, Stata includes "L." with the variable label.
I have two questions:
Code:
clear all input float(year panelid yvar xvar1 xvar2) 1999 1 3 2 3 2000 1 5 2 7 2001 1 6 3 9 2002 1 5 3 1 1999 2 4 8 2 2000 2 8 8 4 2001 2 9 8 8 2002 2 9 8 9 1999 3 2 9 1 2000 3 1 9 3 2001 3 3 7 4 2002 3 4 6 5 end lab var xvar1 "Ind. Var. 1" lab var xvar2 "Ind. Var. 2" local ivars xvar1 xvar2 xtset panelid year qui eststo: xtreg yvar l.(`ivars') coefplot, keep(l.(`ivars')) coefplot, keep(l.xvar1) coefplot, keep(*`ivars')
I have two questions:
- How should I keep selected variables in the coefplot command when I've used a combination of macros and time series operators?
- How should I remove "L." from the coefficient labels?