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
- Attributes:¶
- 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.
- model
class
instance
Pointer to GLM model instance that called fit.
- nobs
float
The number of observations n.
normalized_cov_params
ndarray
See specific model class docstring
- params
ndarray
The coefficients of the fitted model. Note that interpretation of the coefficients often depends on the distribution family and the data.
- pvalues
ndarray
The two-tailed p-values for the parameters.
- scale
float
The estimate of the scale / dispersion for the model fit. See GLM.fit and GLM.estimate_scale for more information.
- stand_errors
ndarray
The standard errors of the fitted GLM. #TODO still named bse
- df_model
Methods
conf_int
([alpha, cols])Construct confidence interval for the fitted parameters.
cov_params
([r_matrix, column, scale, cov_p, ...])Compute the variance/covariance matrix.
f_test
(r_matrix[, cov_p, invcov])Compute the F-test for a joint linear hypothesis.
get_distribution
([exog, exposure, offset, ...])Return a instance of the predictive distribution.
get_hat_matrix_diag
([observed])Compute the diagonal of the hat matrix
get_influence
([observed])Get an instance of GLMInfluence with influence and outlier measures
get_margeff
([at, method, atexog, dummy, count])Get marginal effects of the fitted model.
get_prediction
([exog, exposure, offset, ...])Compute prediction results for GLM compatible models.
info_criteria
(crit[, scale, dk_params])Return an information criterion for the model.
initialize
(model, params, **kwargs)Initialize (possibly re-initialize) a Results instance.
llf_scaled
([scale])Return the log-likelihood at the given scale, using the estimated scale if the provided scale is None.
load
(fname)Load a pickled results instance
See specific model class docstring
plot_added_variable
(focus_exog[, ...])Create an added variable plot for a fitted regression model.
plot_ceres_residuals
(focus_exog[, frac, ...])Conditional Expectation Partial Residuals (CERES) plot.
plot_partial_residuals
(focus_exog[, ax])Create a partial residual, or 'component plus residual' plot for a fitted regression model.
predict
([exog, transform])Call self.model.predict with self.params as the first argument.
pseudo_rsquared
([kind])Pseudo R-squared
Remove data arrays, all nobs arrays from result and model.
save
(fname[, remove_data])Save a pickle of this instance.
score_test
([exog_extra, params_constrained, ...])score test for restrictions or for omitted variables
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, use_t])Compute a t-test for a each linear hypothesis of the form Rb = q.
t_test_pairwise
(term_name[, method, alpha, ...])Perform pairwise t_test with multiple testing corrected p-values.
wald_test
(r_matrix[, cov_p, invcov, use_f, ...])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.
Properties
Akaike Information Criterion -2 * llf + 2 * (df_model + 1)
Bayes Information Criterion
Bayes Information Criterion
Bayes Information Criterion
The standard errors of the parameter estimates.
See statsmodels.families.family for the distribution-specific deviance functions.
The estimated mean response.
Value of the loglikelihood function evalued at params.
Log-likelihood of the model fit with a constant as the only regressor
See GLM docstring.
Fitted values of the null model
The value of the deviance function for the model fit with a constant as the only regressor.
Pearson's Chi-Squared statistic is defined as the sum of the squares of the Pearson residuals.
The two-tailed p values for the t-stats of the params.
Anscombe residuals.
Scaled Anscombe residuals.
Unscaled Anscombe residuals.
Deviance residuals.
Pearson residuals.
Response residuals.
Working residuals.
Return the t-statistic for a given parameter estimate.
Flag indicating to use the Student's distribution in inference.