Documentation Center    • Trials   • Product Updates  Assess
Stationarity of a Time Series  This example shows how to check
whether a linear time series is a unit root process in several
ways. You can assess unit root nonstationarity statistically,
visually, and algebraically.  Simulate Data  Suppose that the
true model for a linear time series is  $$(1 - 0.2L)(1 - L)y_t =
(1 - 0.5L)\varepsilon_t$$  where the innovation series
$\varepsilon_t$ is iid with mean 0 and variance 1.5. Simulate
data from this model. This model is a unit root process because
the lag polynomial of the right side has characteristic root 1.
SimMod = arima('AR',0.2,'MA',-0.5,'D',1,'Constant',0,... T = 30;
Y = simulate(SimMod,T);  Assess Stationarity Statistically
Econometrics Toolbox™ has four formal tests to choose from to
check if a time series is nonstationary: adftest, kpsstest,
pptest, and vratiotest. Use adftest to perform the Dickey-Fuller
test on the data that you simulated in the previous steps.  ans
=   The test result indica