LoslegenKostenlos loslegen

Data analysis - birth rate

Now you will use your new skills to carefully fit an SARIMA model to the birth time series from astsa. The data are monthly live births (adjusted) in thousands for the United States, 1948-1979, and includes the baby boom after WWII.

The birth data are plotted in your R console. Note the long-term trend (random walk) and the seasonal component of the data.

Diese Übung ist Teil des Kurses

ARIMA Models in R

Kurs anzeigen

Anleitung zur Übung

  • Use diff() to difference the data (d_birth). Use acf2() to view the sample ACF and PACF of this data to lag 60. Notice the seasonal persistence.
  • Use another call to diff() to take the seasonal difference of the data. Save this to dd_birth. Use another call to acf2() to view the ACF and PACF of this data, again to lag 60. Conclude that an SARIMA(0,1,1)x(0,1,1)12 model seems reasonable.
  • Fit the SARIMA(0,1,1)x(0,1,1)12 model. What happens?
  • Add an additional AR (nonseasonal, p = 1) parameter to account for additional correlation. Does the model fit well?

Interaktive Übung

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

# Plot P/ACF to lag 60 of differenced data
d_birth <- diff(birth)


# Plot P/ACF to lag 60 of seasonal differenced data
dd_birth <- diff(d_birth, lag = 12)


# Fit SARIMA(0,1,1)x(0,1,1)_12. What happens?


# Add AR term and conclude

Code bearbeiten und ausführen