### Navigation

- index
- modules |
- next |
- statsmodels v0.1.0 documentation »

# Welcome to statsmodels’s documentation!

`scikits.statsmodels` is a pure python package that provides classes and functions for the estimation of several categories of statistical models. These currently include linear regression models, OLS, GLS, WLS and GLS with AR(p) errors, generalized linear models for six distribution families and M-estimators for robust linear models. An extensive list of result statistics are avalable for each estimation problem

## Quickstart for the impatient

License: BSD

Requirements: python 2.4. to 2.6 and latest releases of numpy and scipy

Repository: http://code.launchpad.net/statsmodels

Online Documentation: http://statsmodels.sourceforge.net/

Installation:

    easy_install scikits.statsmodels

or get the source from pypi, sourceforge, or from the launchpad repository and

    setup.py install   or   setup.py develop

Usage:

Get the data, run the estimation, and look at the results. For example, here is a minimal ordinary least squares case

    import numpy as np
    import scikits.statsmodels as sm

    # get data
    nsample = 100
    x = np.linspace(0,10, 100)
    X = sm.tools.add_constant(np.column_stack((x, x**2)))
    beta = np.array([1, 0.1, 10])
    y = np.dot(X, beta) + np.random.normal(size=nsample)

    # run the regression
    results = sm.OLS(y, X).fit()

    # look at the results
    print results.summary()

    and look at `dir(results)` to see some of the results
    that are available

## Table of Content

- Introduction
  - Background
  - Current Status
  - Looking Forward
- Regression
  - Introduction
    - Attributes
    - References
  - Examples
  - Module Reference
    - scikits.statsmodels.regression.OLS
      - scikits.statsmodels.regression.OLS.fit
      - scikits.statsmodels.regression.OLS.information
      - scikits.statsmodels.regression.OLS.initialize
      - scikits.statsmodels.regression.OLS.loglike
      - scikits.statsmodels.regression.OLS.newton
      - scikits.statsmodels.regression.OLS.predict
      - scikits.statsmodels.regression.OLS.score
      - scikits.statsmodels.regression.OLS.whiten
    - scikits.statsmodels.regression.GLS
      - scikits.statsmodels.regression.GLS.fit
      - scikits.statsmodels.regression.GLS.information
      - scikits.statsmodels.regression.GLS.initialize
      - scikits.statsmodels.regression.GLS.loglike
      - scikits.statsmodels.regression.GLS.newton
      - scikits.statsmodels.regression.GLS.predict
      - scikits.statsmodels.regression.GLS.score
      - scikits.statsmodels.regression.GLS.whiten
    - scikits.statsmodels.regression.WLS
      - scikits.statsmodels.regression.WLS.fit
      - scikits.statsmodels.regression.WLS.information
      - scikits.statsmodels.regression.WLS.initialize
      - scikits.statsmodels.regression.WLS.loglike
      - scikits.statsmodels.regression.WLS.newton
      - scikits.statsmodels.regression.WLS.predict
      - scikits.statsmodels.regression.WLS.score
      - scikits.statsmodels.regression.WLS.whiten
    - scikits.statsmodels.regression.GLSAR
      - scikits.statsmodels.regression.GLSAR.fit
      - scikits.statsmodels.regression.GLSAR.information
      - scikits.statsmodels.regression.GLSAR.initialize
      - scikits.statsmodels.regression.GLSAR.iterative_fit
      - scikits.statsmodels.regression.GLSAR.loglike
      - scikits.statsmodels.regression.GLSAR.newton
      - scikits.statsmodels.regression.GLSAR.predict
      - scikits.statsmodels.regression.GLSAR.score
      - scikits.statsmodels.regression.GLSAR.whiten
    - scikits.statsmodels.regression.yule_walker
  - Technical Documentation
    - Technical Documentation
      - Introduction
- Generalized Linear Models
  - Introduction
    - References
  - Examples
  - Module Reference
    - Model and Result Classes
      - scikits.statsmodels.glm.GLM
      - scikits.statsmodels.glm.GLMResults
    - Families
      - scikits.statsmodels.family.family.Family
      - scikits.statsmodels.family.family.Binomial
      - scikits.statsmodels.family.family.Gamma
      - scikits.statsmodels.family.family.Gaussian
      - scikits.statsmodels.family.family.InverseGaussian
      - scikits.statsmodels.family.family.NegativeBinomial
      - scikits.statsmodels.family.family.Poisson
    - Link Functions
      - scikits.statsmodels.family.links.Link
      - scikits.statsmodels.family.links.CDFLink
      - scikits.statsmodels.family.links.CLogLog
      - scikits.statsmodels.family.links.Log
      - scikits.statsmodels.family.links.Logit
      - scikits.statsmodels.family.links.NegativeBinomial
      - scikits.statsmodels.family.links.Power
      - scikits.statsmodels.family.links.cauchy
      - scikits.statsmodels.family.links.identity
      - scikits.statsmodels.family.links.inverse
      - scikits.statsmodels.family.links.inverse_squared
      - scikits.statsmodels.family.links.nbinom
      - scikits.statsmodels.family.links.probit
  - Technical Documentation
    - Technical Documentation
      - Introduction
    - Technical Documentation - part 2
      - Implementation Notes
- Robust Linear Models
  - Introduction
    - References
  - Examples
  - Module Reference
    - Model and Result Classes
      - scikits.statsmodels.rlm.RLM
      - scikits.statsmodels.rlm.RLMResults
    - Norms
      - scikits.statsmodels.robust.norms.AndrewWave
      - scikits.statsmodels.robust.norms.Hampel
      - scikits.statsmodels.robust.norms.HuberT
      - scikits.statsmodels.robust.norms.LeastSquares
      - scikits.statsmodels.robust.norms.RamsayE
      - scikits.statsmodels.robust.norms.RobustNorm
      - scikits.statsmodels.robust.norms.TrimmedMean
      - scikits.statsmodels.robust.norms.TukeyBiweight
      - scikits.statsmodels.robust.norms.estimate_location
    - Scale
      - scikits.statsmodels.robust.scale.Huber
      - scikits.statsmodels.robust.scale.HuberScale
      - scikits.statsmodels.robust.scale.mad
      - scikits.statsmodels.robust.scale.hubers_scale
      - scikits.statsmodels.robust.scale.stand_mad
  - Technical Documentation
    - Weight Functions
- Statistical Tests for Residual Analysis
  - scikits.statsmodels.stattools.durbin_watson
  - scikits.statsmodels.stattools.jarque_bera
  - scikits.statsmodels.stattools.omni_normtest
  - scikits.statsmodels.stattools.conditionnum
- Tools
  - scikits.statsmodels.tools.add_constant
  - scikits.statsmodels.tools.xi
- Internal Classes
  - Introduction
  - Module Reference
    - Model and Result Classes
      - scikits.statsmodels.model.Model
      - scikits.statsmodels.model.LikelihoodModel
      - scikits.statsmodels.model.Results
      - scikits.statsmodels.model.LikelihoodModelResults

## Indices and tables

- Index
- Module Index
- Search Page

### Navigation

- index
- modules |
- next |
- statsmodels v0.1.0 documentation »