Regression with Discrete Dependent Variable
Regression models for limited and qualitative dependent variables. The module currently allows the estimation of models with binary (Logit, Probit), nominal (MNLogit), or count (Poisson, NegativeBinomial) data.
Starting with version 0.9, this also includes new count models, that are still experimental in 0.9, NegativeBinomialP, GeneralizedPoisson and zero-inflated models, ZeroInflatedPoisson, ZeroInflatedNegativeBinomialP and ZeroInflatedGeneralizedPoisson.
See Module Reference for commands and arguments.
Examples
# Load the data from Spector and Mazzeo (1980) In [1]: spector_data = sm.datasets.spector.load() In [2]: spector_data.exog = sm.add_constant(spector_data.exog) # Logit Model In [3]: logit_mod = sm.Logit(spector_data.endog, spector_data.exog) In [4]: logit_res = logit_mod.fit() Optimization terminated successfully. Current function value: 0.402801 Iterations 7 In [5]: print(logit_res.summary())
© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/discretemod.html