I am using the xtabond2 command (Stata 11.2) on a panel dataset with 48 units and 39 observations per unit (balanced panel), such as:
xi: xtabond2 dep_var l(1/2).dep_var i.year_month, gmm(dep_var, lag(3 4)) iv(i.year_month) robust twostep
The results work/meet expectations. I now want to estimate dep_var forward (out of sample) using "predict" and can do so for one period, but get blanks "." in the predicted variable for more than one period. I've followed prior threads on creating dummy variables for the "i.year_month" variable and have also tried to use stand alone lagged values (e.g. "lag3_dep_var = l3.dep_var") of the dependent variable in xtabond2 (see below). But, I get the following error (see below):
xi: xtabond2 dep_var l(1/2).dep_var i.year_month, gmm(dep_var, lag(lag3_dep_var lag4_dep_var)) iv(i.year_month) robust twostep
Laglimits(lag3_Net_Revenue_pu lag4_Net_Revenue_pu) invalid.
r(198);
My questions are:
1. is there better syntax for inserting lagged values in the "gmm" option of xtabond2?
2. is there a more appropriate way to create multi-period forecasts for xtabond2?
Todd Sears
xi: xtabond2 dep_var l(1/2).dep_var i.year_month, gmm(dep_var, lag(3 4)) iv(i.year_month) robust twostep
The results work/meet expectations. I now want to estimate dep_var forward (out of sample) using "predict" and can do so for one period, but get blanks "." in the predicted variable for more than one period. I've followed prior threads on creating dummy variables for the "i.year_month" variable and have also tried to use stand alone lagged values (e.g. "lag3_dep_var = l3.dep_var") of the dependent variable in xtabond2 (see below). But, I get the following error (see below):
xi: xtabond2 dep_var l(1/2).dep_var i.year_month, gmm(dep_var, lag(lag3_dep_var lag4_dep_var)) iv(i.year_month) robust twostep
Laglimits(lag3_Net_Revenue_pu lag4_Net_Revenue_pu) invalid.
r(198);
My questions are:
1. is there better syntax for inserting lagged values in the "gmm" option of xtabond2?
2. is there a more appropriate way to create multi-period forecasts for xtabond2?
Todd Sears
Comment