### Navigation

- index
- modules |
- next |
- statsmodels v0.2.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: Simplified BSD

Requirements: python 2.4. to 2.6 and
  recent releases of numpy (>=1.3) and scipy (>=0.7) earlier versions of numpy and scipy might work but not tested Optional: Many of the examples use matplotlib, and some sandbox functions have additional dependencies

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

Documentation: http://statsmodels.sourceforge.net/
  and in the docs/build folder

Pypi: http://pypi.python.org/pypi/scikits.statsmodels

Mailing List: http://groups.google.com/group/pystatsmodels?hl=en

Bug Tracker: https://bugs.launchpad.net/statsmodels

Installation:

    easy_install scikits.statsmodels

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

    setup.py install  or, if this does not work, try
    setup.py build install

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

Note: Due to our infrequent official releases, we want to point out that the trunk branch in the launchpad repository will have the most recent code and is usually stable and tested and fine for daily use.

## Table of Contents

- Introduction
  - Background
  - Current Status
  - Looking Forward
- Related Packages
  - Data Handling
  - Data Analysis
  - Domain-specific Data Analysis
  - Other packages

- Regression
  - Introduction
    - Attributes
    - References
  - Examples
  - Module Reference
    - Model Classes
    - Results Class
  - Technical Documentation
    - Technical Documentation
- Regression with Discrete Dependent Variable
  - Introduction
    - References
    - Examples
  - Module Reference
    - scikits.statsmodels.discretemod.Logit
    - scikits.statsmodels.discretemod.Probit
    - scikits.statsmodels.discretemod.MNLogit
    - scikits.statsmodels.discretemod.Poisson
    - scikits.statsmodels.discretemod.DiscreteModel
    - scikits.statsmodels.discretemod.DiscreteResults
- Generalized Linear Models
  - Introduction
    - References
  - Examples
  - Module Reference
    - Model Class
    - Results Class
    - Families
    - Link Functions
  - Technical Documentation
    - Technical Documentation
    - Technical Documentation - part 2
- Robust Linear Models
  - Introduction
    - References
  - Examples
  - Module Reference
    - Model and Result Classes
    - Norms
    - Scale
  - Technical Documentation
    - Weight Functions
- Regression with Discrete Dependent Variable
  - Introduction
    - References
    - Examples
  - Module Reference
    - scikits.statsmodels.discretemod.Logit
    - scikits.statsmodels.discretemod.Probit
    - scikits.statsmodels.discretemod.MNLogit
    - scikits.statsmodels.discretemod.Poisson
    - scikits.statsmodels.discretemod.DiscreteModel
    - scikits.statsmodels.discretemod.DiscreteResults
- 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.categorical
  - scikits.statsmodels.tools.ECDF
  - scikits.statsmodels.tools.clean0
  - scikits.statsmodels.tools.fullrank
  - scikits.statsmodels.tools.isestimable
  - scikits.statsmodels.tools.monotone_fn_inverter
  - scikits.statsmodels.tools.rank
  - scikits.statsmodels.tools.recipr
  - scikits.statsmodels.tools.recipr0
  - scikits.statsmodels.tools.unsqueeze
- Internal Classes
  - Introduction
  - Module Reference
    - Model and Results Classes
- Sandbox
  - Introduction
  - Examples
  - Module Reference
    - Time Series analysis `tsa`
    - Regression and ANOVA
    - Systems of Regression Equations and Simultaneous Equations
    - Miscellaneous
    - Original stats.models

## Indices and tables

- Index
- Module Index
- Search Page

### Navigation

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