3.9.2. statsmodels.regression.linear_model

This module implements standard regression models:

Generalized Least Squares (GLS) Ordinary Least Squares (OLS) Weighted Least Squares (WLS) Generalized Least Squares with autoregressive error terms GLSAR(p)

Models are specified with an endogenous response variable and an exogenous design matrix and are fit using their fit method.

Subclasses that have more complicated covariance matrices should write over the ‘whiten’ method as the fit method prewhitens the response by calling ‘whiten’.

General reference for regression models:

    1. Montgomery and E.A. Peck. “Introduction to Linear Regression

    Analysis.” 2nd. Ed., Wiley, 1992.

Econometrics references for regression models:

  1. Davidson and J.G. MacKinnon. “Econometric Theory and Methods,” Oxford,
  1. Green. “Econometric Analysis,” 5th ed., Pearson, 2003.

3.9.2.1. Functions

add_constant(data[, prepend, has_constant]) This appends a column of ones to an array if prepend==False.
chain_dot(*arrs) Returns the dot product of the given matrices.
pinv_extended(X[, rcond]) Return the pinv of an array X as well as the singular values used in computation.
yule_walker(X[, order, method, df, inv, demean]) Estimate AR(p) parameters from a sequence X using Yule-Walker equation.

3.9.2.2. Classes

GLS(endog, exog[, sigma, missing, hasconst]) Generalized least squares model with a general covariance structure.
GLSAR(endog[, exog, rho, missing]) A regression model with an AR(p) covariance structure.
OLS(endog[, exog, missing, hasconst]) A simple ordinary least squares model.
OLSResults(model, params[, ...]) Results class for for an OLS model.
RegressionModel(endog, exog, **kwargs) Base class for linear regression models.
RegressionResults(model, params[, ...]) This class summarizes the fit of a linear regression model.
RegressionResultsWrapper(results)
WLS(endog, exog[, weights, missing, hasconst]) A regression model with diagonal but non-identity covariance structure.
cache_writable([cachename, resetlist]) Decorator for CachedWritableAttribute
resettable_cache alias of ResettableCache

3.9.2.3. Exceptions

InvalidTestWarning