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.
Este ejercicio forma parte del curso
ARIMA Models in Python
Instrucciones del ejercicio
- Instantiate an ARMAX(2,1) model to train on the
'wait_times_hrs'
column ofhospital
using the'nurse_count'
column as an exogenous variable. - Fit the model.
- Print the summary of the model fit.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Instantiate the model
model = ____
# Fit the model
results = ____
# Print model fit summary
____