Generalized linear models currently supports estimation using the one-parameter exponential families
>>> import scikits.statsmodels as sm >>> data = sm.datasets.scotland.Load() >>> data.exog = sm.add_constant(data.exog)Instantiate a gamma family model with the default link function.
>>> gamma_model = sm.GLM(data.endog, data.exog, family=sm.family.Gamma()) >>> gamma_results = gamma_model.fit()
see also the examples and the tests folders
| GLMResults(model, params, ...) | Class to contain GLM results. |
The distribution families currently implemented are
| Family | |
| Binomial | |
| Gamma | |
| Gaussian | |
| InverseGaussian | |
| NegativeBinomial | |
| Poisson |
The link functions currently implemented are the following. Not all link functions are available for each distribution family. The list of available link functions can be obtained by
>>> ssm.family.family.<familyname>.available ?
| Link | |
| CDFLink | |
| CLogLog | |
| Log | |
| Logit | |
| NegativeBinomial | |
| Power | |
| cauchy | |
| cloglog | |
| identity | |
| inverse | |
| inverse_squared | |
| log | |
| logit | |
| nbinom | |
| probit |