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.
Cet exercice fait partie du cours
ARIMA Models in R
Instructions
- Use
diff()to difference the data (d_birth). Useacf2()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 todd_birth. Use another call toacf2()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?
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# 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