Simulated ARIMA
Before analyzing actual time series data, you should try working with a slightly more complicated model.
Here, we generated 250 observations from the ARIMA(2,1,0) model with drift given by $$Y_t = 1 + 1.5 Y_{t-1} - .75 Y_{t-2} + W_t\,$$ where \(Y_t = \nabla X_t = X_{t} - X_{t-1}\).
You will use the established techniques to fit a model to the data.
The astsa package is preloaded and the generated data are in x. The series x and the detrended series y <- diff(x) have been plotted.
Cet exercice fait partie du cours
ARIMA Models in R
Instructions
- Plot the sample ACF and PACF using
acf2()of the differenced datadiff(x)to determine a model. - Fit an ARIMA(2,1,0) model using
sarima()to the generated data. Examine the t-table and other output information to assess the model fit.
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Plot sample P/ACF of differenced data and determine model
# Estimate parameters and examine output