Get startedGet started for free

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.

This exercise is part of the course

ARIMA Models in R

View Course

Exercise instructions

  • Plot the sample ACF and PACF using acf2() of the differenced data diff(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.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Plot sample P/ACF of differenced data and determine model



# Estimate parameters and examine output

Edit and Run Code