ARIMA.from_formula()

statsmodels.tsa.arima_model.ARIMA.from_formula classmethod ARIMA.from_formula(formula, data, subset=None, *args, **kwargs) Create a Model from a formula and dataframe. Parameters: formula : str or generic Formula object The formula specifying the model data : array-like The data for the model. See Notes. subset : array-like An array-like object of booleans, integers, or index values that indicate the subset of df to use in the model. Assumes df is a pandas.DataFrame args : extra argum

AR.select_order()

statsmodels.tsa.ar_model.AR.select_order AR.select_order(maxlag, ic, trend='c', method='mle') [source] Select the lag order according to the information criterion. Parameters: maxlag : int The highest lag length tried. See AR.fit. ic : str {?aic?,?bic?,?hqic?,?t-stat?} Criterion used for selecting the optimal lag length. See AR.fit. trend : str {?c?,?nc?} Whether to include a constant or not. ?c? - include constant. ?nc? - no constant. Returns: bestlag : int Best lag according to I

AR.score()

statsmodels.tsa.ar_model.AR.score AR.score(params) [source] Return the gradient of the loglikelihood at params. Parameters: params : array-like The parameter values at which to evaluate the score function. Notes Returns numerical gradient.

AR.predict()

statsmodels.tsa.ar_model.AR.predict AR.predict(params, start=None, end=None, dynamic=False) [source] Returns in-sample and out-of-sample prediction. Parameters: params : array The fitted model parameters. start : int, str, or datetime Zero-indexed observation number at which to start forecasting, ie., the first forecast is start. Can also be a date string to parse or a datetime type. end : int, str, or datetime Zero-indexed observation number at which to end forecasting, ie., the first

AR.information()

statsmodels.tsa.ar_model.AR.information AR.information(params) [source] Not Implemented Yet

AR.initialize()

statsmodels.tsa.ar_model.AR.initialize AR.initialize() [source]

AR.loglike()

statsmodels.tsa.ar_model.AR.loglike AR.loglike(params) [source] The loglikelihood of an AR(p) process Parameters: params : array The fitted parameters of the AR model Returns: llf : float The loglikelihood evaluated at params Notes Contains constant term. If the model is fit by OLS then this returns the conditonal maximum likelihood. If it is fit by MLE then the (exact) unconditional maximum likelihood is returned. where is a (p x 1) vector with each element equal to the mean

AR.hessian()

statsmodels.tsa.ar_model.AR.hessian AR.hessian(params) [source] Returns numerical hessian for now.

AR.from_formula()

statsmodels.tsa.ar_model.AR.from_formula classmethod AR.from_formula(formula, data, subset=None, *args, **kwargs) Create a Model from a formula and dataframe. Parameters: formula : str or generic Formula object The formula specifying the model data : array-like The data for the model. See Notes. subset : array-like An array-like object of booleans, integers, or index values that indicate the subset of df to use in the model. Assumes df is a pandas.DataFrame args : extra arguments The

ANOVA

ANOVA Analysis of Variance models Examples In [1]: import statsmodels.api as sm In [2]: from statsmodels.formula.api import ols In [3]: moore = sm.datasets.get_rdataset("Moore", "car", ...: cache=True) # load data ...: In [4]: data = moore.data In [5]: data = data.rename(columns={"partner.status" : ...: "partner_status"}) # make name pythonic ...: In [6]: moore_lm = ols('conformity ~ C(fcategory, Sum)*C(partner_sta