statsmodels.genmod.generalized_linear_model.GLMResults

class statsmodels.genmod.generalized_linear_model.GLMResults(model, params, normalized_cov_params, scale, cov_type='nonrobust', cov_kwds=None, use_t=None)[source]

Class to contain GLM results.

GLMResults inherits from statsmodels.LikelihoodModelResults

Parameters:

See statsmodels.LikelihoodModelReesults

Returns:

Attributes

aic : float

Akaike Information Criterion -2 * llf + 2*(df_model + 1)

bic : float

Bayes Information Criterion deviance - df_resid * log(nobs)

deviance : float

See statsmodels.families.family for the distribution-specific deviance functions.

df_model : float

See GLM.df_model

df_resid : float

See GLM.df_resid

fit_history : dict

Contains information about the iterations. Its keys are iterations, deviance and params.

fittedvalues : array

Linear predicted values for the fitted model. dot(exog, params)

llf : float

Value of the loglikelihood function evalued at params. See statsmodels.families.family for distribution-specific loglikelihoods.

model : class instance

Pointer to GLM model instance that called fit.

mu : array

See GLM docstring.

nobs : float

The number of observations n.

normalized_cov_params : array

See GLM docstring

null_deviance : float

The value of the deviance function for the model fit with a constant as the only regressor.

params : array

The coefficients of the fitted model. Note that interpretation of the coefficients often depends on the distribution family and the data.

pearson_chi2 : array

Pearson’s Chi-Squared statistic is defined as the sum of the squares of the Pearson residuals.

pinv_wexog : array

See GLM docstring.

pvalues : array

The two-tailed p-values for the parameters.

resid_anscombe : array

Anscombe residuals. See statsmodels.families.family for distribution- specific Anscombe residuals.

resid_deviance : array

Deviance residuals. See statsmodels.families.family for distribution- specific deviance residuals.

resid_pearson : array

Pearson residuals. The Pearson residuals are defined as (endog - mu)/sqrt(VAR(mu)) where VAR is the distribution specific variance function. See statsmodels.families.family and statsmodels.families.varfuncs for more information.

resid_response : array

Respnose residuals. The response residuals are defined as endog - fittedvalues

resid_working : array

Working residuals. The working residuals are defined as resid_response/link’(mu). See statsmodels.family.links for the derivatives of the link functions. They are defined analytically.

scale : float

The estimate of the scale / dispersion for the model fit. See GLM.fit and GLM.estimate_scale for more information.

stand_errors : array

The standard errors of the fitted GLM. #TODO still named bse

Methods

aic()
bic()
deviance()
fittedvalues()
llf()
llnull()
null()
null_deviance()
pearson_chi2()
remove_data() remove data arrays, all nobs arrays from result and model
resid_anscombe()
resid_deviance()
resid_pearson()
resid_response()
resid_working()
summary([yname, xname, title, alpha]) Summarize the Regression Results
summary2([yname, xname, title, alpha, ...]) Experimental summary for regression Results

Attributes

use_t