1. statsmodels.api

Statistical models

  • standard regression models
  • GLS (generalized least squares regression)
  • OLS (ordinary least square regression)
  • WLS (weighted least square regression)
  • GLASAR (GLS with autoregressive errors model)
  • GLM (generalized linear models)
  • robust statistical models
  • RLM (robust linear models using M estimators)
  • robust.norms estimates
  • robust.scale estimates (MAD, Huber’s proposal 2).
  • sandbox models
  • mixed effects models
  • gam (generalized additive models)

1.1. Functions

add_constant(data[, prepend, has_constant]) This appends a column of ones to an array if prepend==False.
categorical(data[, col, dictnames, drop]) Returns a dummy matrix given an array of categorical variables.
load(fname) Load a previously saved object from file
qqline(ax, line[, x, y, dist, fmt]) Plot a reference line for a qqplot.
qqplot(data[, dist, distargs, a, loc, ...]) Q-Q plot of the quantiles of x versus the quantiles/ppf of a distribution.
qqplot_2samples(data1, data2[, xlabel, ...]) Q-Q Plot of two samples’ quantiles.
show_versions([show_dirs])
webdoc([arg, stable]) Opens a browser and displays online documentation

1.2. Classes

GEE(endog, exog, groups[, time, family, ...]) Estimation of marginal regression models using Generalized Estimating Equations (GEE).
GLM(endog, exog[, family, offset, exposure, ...]) Generalized Linear Models class
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.
Logit(endog, exog, **kwargs) Binary choice logit model
MNLogit(endog, exog, **kwargs) Multinomial logit model
MixedLM(endog, exog, groups[, exog_re, ...]) An object specifying a linear mixed effects model.
NegativeBinomial(endog, exog[, ...]) Negative Binomial Model for count data
NominalGEE(endog, exog, groups[, time, ...]) Estimation of nominal response marginal regression models using Generalized Estimating Equations (GEE).
OLS(endog[, exog, missing, hasconst]) A simple ordinary least squares model.
OrdinalGEE(endog, exog, groups[, time, ...]) Estimation of ordinal response marginal regression models using Generalized Estimating Equations (GEE).
PHReg(endog, exog[, status, entry, strata, ...]) Fit the Cox proportional hazards regression model for right censored data.
Poisson(endog, exog[, offset, exposure, missing]) Poisson model for count data
ProbPlot(data[, dist, fit, distargs, a, ...]) Class for convenient construction of Q-Q, P-P, and probability plots.
Probit(endog, exog, **kwargs) Binary choice Probit model
QuantReg(endog, exog, **kwargs) Quantile Regression
RLM(endog, exog[, M, missing]) Robust Linear Models
WLS(endog, exog[, weights, missing, hasconst]) A regression model with diagonal but non-identity covariance structure.