You are on page 1of 1

Time series analysis

(Session VI)
Commands and syntax for ARIMA model using STATA
1. Open and Run the STATA application copy the data to the Data editor
2. Declare the dataset to be time series data, type the following
tsset time variable (set the time variable
. C!e"# for stationarity with line graph, correlogram and Augmented Dic!y fuller"
line yvar #var, name(Stationarity
"orrgram yvar
dfuller yvar,
$. Corre"t for non%stationarity (Differencing for removing the trend
(i) $
st
order difference of yvar, create a new variable dy$ as%
gen dy$ & '.yvar
(ii) &
nd
order difference of yvar, create another new variable dy& as%
gen dy& & '.'.dy$
(. )xamine t!e differen"ed *aria+le for t!e stationarity
line dy$ #var, name(DiffStat,
"orrgram dy$
dfuller dy$
,. Identify t!e -arameters for ARIMA Model
.. )stimate an ARIMA Model
(i) ARIMA (-/d/0) model
arima yvar/ arima(p,d,')
1. Tests for model
estat i"
2. 3ost estimation in ARIMA
-redi"t new variable/ x+ ( forecasting for differenced variable
-redi"t new variable/ y ( forecasting for dependant variable
-redi"t new variable/ y dynami" (time_period) forecasting for the predicted values
14. Com-are t!e -redi"ted *alues using line gra-!

You might also like