LoslegenKostenlos loslegen

Fitting an MA(1) model

In this exercise, we generated data from an MA(1) model, $$X_t = W_t - .8 W_{t-1} ,$$ x <- arima.sim(model = list(order = c(0, 0, 1), ma = -.8), n = 100). Look at the simulated data and the sample ACF and PACF to determine the order based on the table given in the first exercise. Then fit the model.

Recall that for pure MA(q) models, the theoretical ACF will cut off at lag q while the PACF will tail off.

Diese Übung ist Teil des Kurses

ARIMA Models in R

Kurs anzeigen

Anleitung zur Übung

  • The package astsa is preloaded. 100 MA(1) observations have been pre-loaded as x.
  • Use plot() to plot the generated data in x.
  • Plot the sample ACF and PACF pairs using acf2() from the astsa package.
  • Use sarima() from astsa to fit an MA(1) to the previously generated data. Examine the t-table and compare the estimates to the true values.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# astsa is preloaded

# Plot x


# Plot the sample P/ACF of x


# Fit an MA(1) to the data and examine the t-table

Code bearbeiten und ausführen