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()
bse()
conf_int([alpha, cols, method]) Returns the confidence interval of the fitted parameters.
cov_params([r_matrix, column, scale, cov_p, ...]) Returns the variance/covariance matrix.
deviance()
f_test(r_matrix[, cov_p, scale, invcov]) Compute the F-test for a joint linear hypothesis.
fittedvalues()
get_prediction([exog, exposure, offset, ...]) compute prediction results
initialize(model, params, **kwd)
llf()
llnull()
load(fname) load a pickle, (class method)
mu()
normalized_cov_params()
null()
null_deviance()
pearson_chi2()
plot_added_variable(focus_exog[, ...]) Create an added variable plot for a fitted regression model.
plot_ceres_residuals(focus_exog[, frac, ...]) Produces a CERES (Conditional Expectation Partial Residuals) plot for a fitted regression model.
plot_partial_residuals(focus_exog[, ax]) Create a partial residual, or ‘component plus residual’ plot for a fited regression model.
predict([exog, transform]) Call self.model.predict with self.params as the first argument.
pvalues()
remove_data() remove data arrays, all nobs arrays from result and model
resid_anscombe()
resid_deviance()
resid_pearson()
resid_response()
resid_working()
save(fname[, remove_data]) save a pickle of this instance
summary([yname, xname, title, alpha]) Summarize the Regression Results
summary2([yname, xname, title, alpha, ...]) Experimental summary for regression Results
t_test(r_matrix[, cov_p, scale, use_t]) Compute a t-test for a each linear hypothesis of the form Rb = q
tvalues() Return the t-statistic for a given parameter estimate.
wald_test(r_matrix[, cov_p, scale, invcov, ...]) Compute a Wald-test for a joint linear hypothesis.
wald_test_terms([skip_single, ...]) Compute a sequence of Wald tests for terms over multiple columns

Methods

aic()
bic()
bse()
conf_int([alpha, cols, method]) Returns the confidence interval of the fitted parameters.
cov_params([r_matrix, column, scale, cov_p, ...]) Returns the variance/covariance matrix.
deviance()
f_test(r_matrix[, cov_p, scale, invcov]) Compute the F-test for a joint linear hypothesis.
fittedvalues()
get_prediction([exog, exposure, offset, ...]) compute prediction results
initialize(model, params, **kwd)
llf()
llnull()
load(fname) load a pickle, (class method)
mu()
normalized_cov_params()
null()
null_deviance()
pearson_chi2()
plot_added_variable(focus_exog[, ...]) Create an added variable plot for a fitted regression model.
plot_ceres_residuals(focus_exog[, frac, ...]) Produces a CERES (Conditional Expectation Partial Residuals) plot for a fitted regression model.
plot_partial_residuals(focus_exog[, ax]) Create a partial residual, or ‘component plus residual’ plot for a fited regression model.
predict([exog, transform]) Call self.model.predict with self.params as the first argument.
pvalues()
remove_data() remove data arrays, all nobs arrays from result and model
resid_anscombe()
resid_deviance()
resid_pearson()
resid_response()
resid_working()
save(fname[, remove_data]) save a pickle of this instance
summary([yname, xname, title, alpha]) Summarize the Regression Results
summary2([yname, xname, title, alpha, ...]) Experimental summary for regression Results
t_test(r_matrix[, cov_p, scale, use_t]) Compute a t-test for a each linear hypothesis of the form Rb = q
tvalues() Return the t-statistic for a given parameter estimate.
wald_test(r_matrix[, cov_p, scale, invcov, ...]) Compute a Wald-test for a joint linear hypothesis.
wald_test_terms([skip_single, ...]) Compute a sequence of Wald tests for terms over multiple columns

Attributes

use_t