# statsmodels.regression.linear_model.RegressionResults¶

class statsmodels.regression.linear_model.RegressionResults(model, params, normalized_cov_params=None, scale=1.0, cov_type='nonrobust', cov_kwds=None, use_t=None, **kwargs)[source]

This class summarizes the fit of a linear regression model.

It handles the output of contrasts, estimates of covariance, etc.

Attributes
pinv_wexog

See specific model class docstring

cov_HC0

See statsmodels.RegressionResults

cov_HC1

See statsmodels.RegressionResults

cov_HC2

See statsmodels.RegressionResults

cov_HC3

See statsmodels.RegressionResults

cov_type

Parameter covariance estimator used for standard errors and t-stats

df_model

Model degrees of freedom. The number of regressors p. Does not include the constant if one is present

df_resid

Residual degrees of freedom. n - p - 1, if a constant is present. n - p if a constant is not included.

het_scale

adjusted squared residuals for heteroscedasticity robust standard errors. Is only available after HC#_se or cov_HC# is called. See HC#_se for more information.

history

Estimation history for iterative estimators

HC0_se

See statsmodels.RegressionResults

HC1_se

See statsmodels.RegressionResults

HC2_se

See statsmodels.RegressionResults

HC3_se

See statsmodels.RegressionResults

model

A pointer to the model instance that called fit() or results.

params

The linear coefficients that minimize the least squares criterion. This is usually called Beta for the classical linear model.

resid_pearson

Residuals, normalized to have unit variance.

Methods

 See statsmodels.RegressionResults See statsmodels.RegressionResults See statsmodels.RegressionResults See statsmodels.RegressionResults Akaike’s information criteria. Bayes’ information criteria. The standard errors of the parameter estimates. The total (weighted) sum of squares centered about the mean. compare_f_test(restricted) use F test to test whether restricted model is correct compare_lm_test(restricted[, demean, use_lr]) Use Lagrange Multiplier test to test whether restricted model is correct compare_lr_test(restricted[, large_sample]) Likelihood ratio test to test whether restricted model is correct Return condition number of exogenous matrix. conf_int([alpha, cols]) Returns the confidence interval of the fitted parameters. See statsmodels.RegressionResults See statsmodels.RegressionResults See statsmodels.RegressionResults See statsmodels.RegressionResults cov_params([r_matrix, column, scale, cov_p, …]) Returns the variance/covariance matrix. Return eigenvalues sorted in decreasing order. Explained sum of squares. p-value of the F-statistic f_test(r_matrix[, cov_p, scale, invcov]) Compute the F-test for a joint linear hypothesis. The predicted values for the original (unwhitened) design. F-statistic of the fully specified model. get_prediction([exog, transform, weights, …]) compute prediction results get_robustcov_results([cov_type, use_t]) create new results instance with robust covariance as default initialize(model, params, **kwd) Initialize (possibly re-initialize) a Results instance. Log-likelihood of model load(fname) load a pickle, (class method) Mean squared error the model. Mean squared error of the residuals. Total mean squared error. Number of observations n. See specific model class docstring predict([exog, transform]) Call self.model.predict with self.params as the first argument. The two-tailed p values for the t-stats of the params. remove data arrays, all nobs arrays from result and model The residuals of the model. Residuals, normalized to have unit variance. R-squared of a model with an intercept. Adjusted R-squared. save(fname[, remove_data]) save a pickle of this instance A scale factor for the covariance matrix. Sum of squared (whitened) residuals. summary([yname, xname, title, alpha]) Summarize the Regression Results summary2([yname, xname, title, alpha, …]) Experimental summary function to summarize the 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 t_test_pairwise(term_name[, method, alpha, …]) perform pairwise t_test with multiple testing corrected p-values Return the t-statistic for a given parameter estimate. Uncentered sum of squares. 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 The residuals of the transformed/whitened regressand and regressor(s)