# How to apply INAR model to a simple time series model in Python

As a course project for Time Series Analysis, I used ARIMA for a very simple model - (Analyzing number of deaths in each episode of game of thrones and forecasting the number of deaths in the final episode), thus there wasn't as much data for this. I have been asked to redo it using INAR model. I was wondering if that could be achieved using ARIMA and applying zero for the MA and lag part, which would just give it AR. But I'm confused as to how to make it Integer valued. I need this done in Python and was wondering if there is a model out there for this.

This is the code I used for forecasting but I'm sure INAR is more than this.

#Prediction
model = ARIMA(df, order=(15, 0, 0))
model_fit = model.fit(disp=False)
prediction = model_fit.forecast()[0]
print(prediction)


Unfortunately, there does not seem to be anything in Python, judging from a couple of searches using combinations of "integer autoregressive", "count data" and "time series". You could take published descriptions of INAR models (e.g., this or this, both of which I haven't read) and "roll your own" estimator in Python. Or, if you are open to alternatives to Python, the tscount package for R may be helpful. (While Python's statistical capabilities have been catching up to R, they still lag behind, and count data time series models are one aspect where R is ahead. There are also others.)