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

Estimation

In the last exercise, the ACF and PACF were a little inconclusive. The results suggest your data could be an ARMA(p,q) model or could be an imperfect AR(3) model. In this exercise you will search over models over some model orders to find the best one according to AIC.

The time series savings has been loaded and the ARIMA class has been imported into your environment.

Bu egzersiz

ARIMA Models in Python

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

Egzersiz talimatları

  • Loop over values of p from 0 to 3 and values of q from 0 to 3.
  • Inside the loop, create an ARMA(p,q) model.
  • Then fit the model to the time series savings.
  • At the end of each loop print the values of p and q and the AIC and BIC.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Loop over p values from 0-3
for p in ____:
  
  # Loop over q values from 0-3
    for q in ____:
      try:
        # Create and fit ARMA(p,q) model
        model = ____(____, order=____)
        results = ____
        
        # Print p, q, AIC, BIC
        print(____)
        
      except:
        print(p, q, None, None)
Kodu Düzenle ve Çalıştır