IniziaInizia gratis

Fitting an ARMAX model

In this exercise you will fit an ARMAX model to a time series which represents the wait times at an accident and emergency room for urgent medical care.

The variable you would like to model is the wait times to be seen by a medical professional wait_times_hrs. This may be related to an exogenous variable that you measured nurse_count which is the number of nurses on shift at any given time. These can be seen below.

This is a particularly interesting case of time series modeling as, if the number of nurses has an effect, you could change this to affect the wait times.

The time series data is available in your environment as hospital and has the two columns mentioned above. The ARMA class is also available for you.

Questo esercizio fa parte del corso

ARIMA Models in Python

Visualizza il corso

Istruzioni dell'esercizio

  • Instantiate an ARMAX(2,1) model to train on the 'wait_times_hrs' column of hospital using the 'nurse_count' column as an exogenous variable.
  • Fit the model.
  • Print the summary of the model fit.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Instantiate the model
model = ____

# Fit the model
results = ____

# Print model fit summary
____
Modifica ed esegui il codice