# statsmodels.tsa.ar_model.AR¶

class statsmodels.tsa.ar_model.AR(endog, dates=None, freq=None, missing='none')[source]

Autoregressive AR(p) model.

Deprecated since version 0.11.

Parameters
endogarray_like

A 1-d endogenous response variable. The independent variable.

datesarray_like, optional

An array-like object of datetime objects. If a pandas object is given for endog or exog, it is assumed to have a DateIndex.

freqstr, optional

The frequency of the time-series. A Pandas offset or ‘B’, ‘D’, ‘W’, ‘M’, ‘A’, or ‘Q’. This is optional if dates are given.

missingstr

Available options are ‘none’, ‘drop’, and ‘raise’. If ‘none’, no nan checking is done. If ‘drop’, any observations with nans are dropped. If ‘raise’, an error is raised. Default is ‘none’.

Methods

 fit([maxlag, method, ic, trend, …]) Fit the unconditional maximum likelihood of an AR(p) process. from_formula(formula, data[, subset, drop_cols]) Create a Model from a formula and dataframe. hessian(params) Compute the hessian using a numerical approximation. information(params) Not implemented. Initialization of the model (no-op). loglike(params) The loglikelihood of an AR(p) process. predict(params[, start, end, dynamic]) Construct in-sample and out-of-sample prediction. score(params) Compute the gradient of the log-likelihood at params. select_order(maxlag, ic[, trend, method]) Select the lag order according to the information criterion.

Properties

 endog_names Names of endogenous variables. exog_names The names of the exogenous variables.