Search code examples
dynamicstataforecasting

Dynamic forecasting (arima) with multiple regressors in Stata


I have a small time series dataset, a sample of which is below:

year    AvgU5MR     AvgPov      AvgEnrol
2000    126.9307    41.0109     67.11833
2001    123.4138    39.9748     68.66798
2002    119.93      45.85194    65.82739
2003    116.4923    55.3706     69.17756
2004    113.1362    32.63662    70.83884
2005    109.9008    41.08603    75.35649
2006    106.816     43.45722    75.98755
2007    103.8878    19.19114    76.86299
2008    101.1161    38.05993    76.53685
2009    98.50167    21.91146    79.51743
2010    96.03816    36.33022    78.84795
2011    93.71016    35.46586    79.60537
2012    91.49234    24.44083    80.46068
2013    89.36112                79.87075
2014    87.30394        
2015            
...     
2030            

I want to create forecasts until 2030 for AvgU5MR (the variable was non-stationary, so I eliminated this through the fourth difference) based on an arima multiple regression estimation with AvgPov and AvgEnrol as my independent variables, so have entered the following into Stata:

> arima D4.AvgU5MR AvgPov AvgEnrol
> predict U5hat, dynamic(2012) y

However, when I do this, Stata only computes the in-sample predictions, and not the out-of-sample forecasts. Any suggestions on how to get the out-of-sample forecast?

I recognize this (How to get Stata to produce a dynamic forecast when using lagged outcome as a regressor?) also deals with dynamic forecasting, but using similar code as provided in the answer to the hyperlink's question did not give me an out-of-sample forecast.

I thank you in advance for your help.


Solution

  • The problem seems to be you are including independent variables, and therefore, estimating an ARMAX model. For the out-of-sample forecasts, you need also values for the independent variables AvgPov and AvgEnrol. The model doesn't estimate them; recall the dependent variable is D4.AvgU5MR.