I want to simulate, estimate and forecast OOS the following univariate models incorporating a linear trend term.
[1] Linear Trend stationary: y(t) = constant + beta*t + e(t)
[2] RWD Plus Linear trend: y(t) = constant + phi1*y(t-1) + beta*t + e(t), where phi=1
[3] AR(1) with constant Plus Linear trend: y(t) = constant + phi1*y(t-1) + beta*t + e(t), where phi=0.8 (say)
I think they can be handled either as Deterministic or Stochastic?
Specifically for:
[1]
(a) Linear Deterministic trend: y(t) = beta0 + beta(1)*trend + eta, eta being an ARMA process.
(b) Linear Stochastic trend: y(t) = beta0 + beta(1)*trend + eta, eta being an ARIMA process with diffs = 1
They are regression with time series errors.
Depending on how modelled it will make a big difference to the residual plots, and to the fans being wider.
I have estimated using either BOXJENK(GLS) or BOXJENK(REGRESSORS), with
(i) a trend and diffs=0, or
(ii) no trend and diffs=1?
Questions
- I do not understand the difference between the BOXJENK GLS and REGRESSORS options?
- Are the 3 processes simulated and modelled correctly?
[1] Linear Trend stationary: y(t) = constant + beta*t + e(t)
Code: Select all
*===============================
seed 1
compute sigma=3.0
compute nburn=100
compute nobs=500
set e 1 nburn+nobs = %ran(sigma)
* Linear Trend-Stationary model
set trend 1 nburn+nobs = t
set(first=0.0) y 1 nburn+nobs = 1.0 + 0.4*trend + e
prin / y
graph(key=upleft,head="Linear Trend-Stationary Process\\y = constant + beta*t + e(t)") 1
# y nburn+1 nburn+nobs
*===============================
* Linear Trend-Stationary model
* deterministic
* -------------
boxjenk(REGRESSORS,ar=0,diffs=0,ma=0,define=req,MAXL) y nburn+1 nburn+nobs resids
# constant trend
boxjenk(GLS,ar=0,diffs=0,ma=0,define=req,MAXL) y nburn+1 nburn+nobs resids
# constant trend
* stochastic
* ----------
boxjenk(REGRESSORS,ar=0,diffs=1,ma=0,define=req,MAXL) y nburn+1 nburn+nobs resids
# constant
boxjenk(GLS,ar=0,diffs=1,ma=0,define=req,MAXL) y nburn+1 nburn+nobs resids
# constant
[2] RWD with Linear trend: y(t) = constant + phi1*y(t-1) + beta*t + e(t), where phi=1
Code: Select all
*===============================
seed 1
compute nburn=100
compute nobs=500
set u 1 nburn+nobs = %ran(1.0)
* RWD Plus Linear Trend process: Level (Exponential pattern) and Change
set trend 1 nburn+nobs = t
set(first=0.0) y 1 nburn+nobs = 1.0 + 1.0*y{1} + 0.03*trend + u
set d = y-y{1}
graph(key=upleft,head=$
"RWD Plus Linear Trend: Level and change",overlay=line) 2
# y nburn+1 nburn+nobs
# d nburn+1 nburn+nobs
*===============================
* RWD Plus Linear trend model
* stochastic
* ----------
boxjenk(REGRESSORS,ar=1,diffs=1,ma=0,define=req,MAXL,METHOD=GAUSS) y nburn+1 nburn+nobs resids
# constant
boxjenk(GLS,ar=1,diffs=1,ma=0,define=req,MAXL,METHOD=GAUSS) y nburn+1 nburn+nobs resids
# constant
[3] AR(1) with constant and Linear trend: : y(t) = constant + phi1*y(t-1) + beta*t + e(t), where e.g. phi=0.8
Same as [2] with e.g. phi1=0.8
thanks,
Amarjit