Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install scikits.statsmodels

How to install scikits.statsmodels

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install scikits.statsmodels
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.3.1 Available View build log
0.3.0 Available View build log
0.3.0rc1 Available View build log
0.2.0 Available View build log
0.3.1 Failed View build log
Windows (64-bit)
0.3.1 Available View build log
0.3.0 Available View build log
0.3.0rc1 Failed View build log
0.2.0 Available View build log
0.3.1 Failed View build log
Mac OS X (10.5+)
0.3.1 Available View build log
0.3.0 Available View build log
0.3.0rc1 Available View build log
0.2.0 Available View build log
0.3.1 Failed View build log
Linux (32-bit)
0.3.1 Available View build log
0.3.0 Available View build log
0.3.0rc1 Available View build log
0.2.0 Available View build log
0.3.1 Failed View build log
Linux (64-bit)
0.3.1 Available View build log
0.3.0 Available View build log
0.3.0rc1 Available View build log
0.2.0 Available View build log
0.3.1 Failed View build log
0.3.1 Failed View build log
 
License
BSD License
Lastest release
version 0.3.1 on Aug 25th, 2011

What it is

Statsmodels is a Python package that provides a complement to scipy for statistical computations including descriptive statistics and estimation of statistical models.

Main Features

  • regression: Generalized least squares (including weighted least squares and least squares with autoregressive errors), ordinary least squares.

  • glm: Generalized linear models with support for all of the one-parameter exponential family distributions.

  • discrete choice models: Poisson, probit, logit, multinomial logit

  • rlm: Robust linear models with support for several M-estimators.

  • tsa: Time series analysis models, including ARMA, AR, VAR

  • nonparametric : (Univariate) kernel density estimators

  • datasets: Datasets to be distributed and used for examples and in testing.

  • PyDTA: Tools for reading Stata *.dta files into numpy arrays.

    System Message: WARNING/2 (<string>, line 20); backlink

    Inline emphasis start-string without end-string.

  • stats: a wide range of statistical tests

  • sandbox : There is also a sandbox which contains code for generalized additive models (untested), mixed effects models, cox proportional hazards model (both are untested and still dependent on the nipy formula framework), generating descriptive statistics, and printing table output to ascii, latex, and html. There is also experimental code for systems of equations regression, time series models, panel data estimators and information theoretic measures. None of this code is considered "production ready".

Where to get it

Development branches will be on Github. This is where to go to get the most up to date code in the trunk branch. Experimental code is hosted here in branches and in developer forks. This code is merged to master often. We try to make sure that the master branch is always stable.

https://www.github.com/statsmodels/statsmodels

Source download of stable tags will be on SourceForge.

https://sourceforge.net/projects/statsmodels/

or

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

Installation from sources

In the top directory, just do:

System Message: WARNING/2 (<string>, line 55)

Literal block expected; none found.

python setup.py install

See INSTALL.txt for requirements or

http://statsmodels.sourceforge.net/

For more information.

License

Simplified BSD

Documentation

The official documentation is hosted on SourceForge.

http://statsmodels.sourceforge.net/

The sphinx docs are currently undergoing a lot of work. They are not yet comprehensive, but should get you started.

Our blog will continue to be updated as we make progress on the code.

http://scipystats.blogspot.com

Windows Help

The source distribution for Windows includes a htmlhelp file (statsmodels.chm). This can be opened from the python interpreter

>>> import scikits.statsmodels.api as sm
>>> sm.open_help()

Discussion and Development

All chatter will take place on the or scipy-user mailing list. We are very interested in receiving feedback about usability, suggestions for improvements, and bug reports via the mailing list or the bug tracker at

https://github.com/statsmodels/statsmodels/issues

There is also a google group at

http://groups.google.com/group/pystatsmodels

to discuss development and design issues that are deemed to be too specialized for the scipy-dev/user list.

Python 3

scikits.statsmodels has been ported and tested for Python 3.2. Python 3 version of the code can be obtained by running 2to3.py over the entire statsmodels source. The numerical core of statsmodels worked almost without changes, however there can be problems with data input and plotting. The STATA file reader and writer in iolib.foreign has not been ported yet. And there are still some problems with the matplotlib version for Python 3 that was used in testing. Running the test suite with Python 3.2 shows some errors related to foreign and matplotlib.

Release History

0.3.1
  • Removed academic-only WFS dataset.
  • Fix easy_install issue on Windows.
0.3.0

Changes that break backwards compatibility

Added api.py for importing. So the new convention for importing is

System Message: WARNING/2 (<string>, line 140)

Literal block expected; none found.

import scikits.statsmodels.api as sm

Importing from modules directly now avoids unnecessary imports and increases the import speed if a library or user only needs specific functions.

  • sandbox/output.py -> iolib/table.py
  • lib/io.py -> iolib/foreign.py (Now contains Stata .dta format reader)
  • family -> families
  • families.links.inverse -> families.links.inverse_power
  • Datasets' Load class is now load function.
  • regression.py -> regression/linear_model.py
  • discretemod.py -> discrete/discrete_model.py
  • rlm.py -> robust/robust_linear_model.py
  • glm.py -> genmod/generalized_linear_model.py
  • model.py -> base/model.py
  • t() method -> tvalues attribute (t() still exists but raises a warning)

main changes and additions

  • Numerous bugfixes.

  • Time Series Analysis model (tsa) - Vector Autoregression Models VAR (tsa.VAR) - Autogressive Models AR (tsa.AR) - Autoregressive Moving Average Models ARMA (tsa.ARMA) :

    System Message: ERROR/3 (<string>, line 164)

    Unexpected indentation.

    optionally uses Cython for Kalman Filtering use setup.py install with option --with-cython

    System Message: WARNING/2 (<string>, line 166)

    Block quote ends without a blank line; unexpected unindent.

    • Baxter-King band-pass filter (tsa.filters.bkfilter)
    • Hodrick-Prescott filter (tsa.filters.hpfilter)
    • Christiano-Fitzgerald filter (tsa.filters.cffilter)
  • Improved maximum likelihood framework uses all available scipy.optimize solvers

  • Refactor of the datasets sub-package.

  • Added more datasets for examples.

  • Removed RPy dependency for running the test suite.

  • Refactored the test suite.

  • Refactored codebase/directory structure.

  • Support for offset and exposure in GLM.

  • Removed data_weights argument to GLM.fit for Binomial models.

  • New statistical tests, especially diagnostic and specification tests

  • Multiple test correction

  • General Method of Moment framework in sandbox

  • Improved documentation

  • and other additions

0.2.0

main changes

  • renames for more consistency RLM.fitted_values -> RLM.fittedvalues GLMResults.resid_dev -> GLMResults.resid_deviance

  • GLMResults, RegressionResults: lazy calculations, convert attributes to properties with _cache

  • fix tests to run without rpy

  • expanded examples in examples directory

  • add PyDTA to lib.io -- functions for reading Stata *.dta binary files and converting them to numpy arrays

    System Message: WARNING/2 (<string>, line 197); backlink

    Inline emphasis start-string without end-string.

  • made tools.categorical much more robust

  • add_constant now takes a prepend argument

  • fix GLS to work with only a one column design

new

  • add four new datasets
    • A dataset from the American National Election Studies (1996)
    • Grunfeld (1950) investment data
    • Spector and Mazzeo (1980) program effectiveness data
    • A US macroeconomic dataset
  • add four new Maximum Likelihood Estimators for models with a discrete dependent variables with examples

    System Message: ERROR/3 (<string>, line 213)

    Unexpected indentation.

    • Logit
    • Probit
    • MNLogit (multinomial logit)
    • Poisson

sandbox

  • add qqplot in sandbox.graphics
  • add sandbox.tsa (time series analysis) and sandbox.regression (anova)
  • add principal component analysis in sandbox.tools
  • add Seemingly Unrelated Regression (SUR) and Two-Stage Least Squares for systems of equations in sandbox.sysreg.Sem2SLS
  • add restricted least squares (RLS)
0.1.0b1
  • initial release

Subscribe to package updates

Last updated Aug 25th, 2011

Download Stats

Last month:5

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.