text_plain_output_2.png application_vnd.jupyter.stderr_output_1.png
from random import random

from statsmodels.tsa.ar_model import AR

import matplotlib.pyplot as plt

xdata = range(1, 100)
ydata = [x + 3 * random() for x in xdata]
plt.xlim(0, 100)
plt.ylim(0, 100)
plt.scatter(xdata, ydata, s=10)
plt.show()
model = AR(ydata)
model_fit = model.fit()