BaşlayınÜcretsiz Başlayın

Fitting an AR(2) model

For this exercise, we generated data from the AR(2) model, $$X_t = 1.5 X_{t-1} - .75 X_{t-2} + W_t,$$ using x <- arima.sim(model = list(order = c(2, 0, 0), ar = c(1.5, -.75)), n = 200). Look at the simulated data and the sample ACF and PACF pair to determine the model order. Then fit the model and compare the estimated parameters to the true parameters.

Bu egzersiz

ARIMA Models in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • The package astsa is preloaded. x contains the 200 AR(2) observations.
  • Use plot() to plot the generated data in x.
  • Plot the sample ACF and PACF pair using acf2() from the astsa package.
  • Use sarima() to fit an AR(2) to the previously generated data in x. Examine the t-table and compare the estimates to the true values.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# astsa is preloaded

# Plot x


# Plot the sample P/ACF of x


# Fit an AR(2) to the data and examine the t-table

Kodu Düzenle ve Çalıştır