statsmodels.regression.linear_model.OLSResults¶
-
class
statsmodels.regression.linear_model.
OLSResults
(model, params, normalized_cov_params=None, scale=1.0, cov_type='nonrobust', cov_kwds=None, use_t=None, **kwargs)[source]¶ Results class for for an OLS model.
- Parameters
- model
RegressionModel
The regression model instance.
- params
ndarray
The estimated parameters.
- normalized_cov_params
ndarray
The normalized covariance parameters.
- scale
float
The estimated scale of the residuals.
- cov_type
str
The covariance estimator used in the results.
- cov_kwds
dict
Additional keywords used in the covariance specification.
- use_tbool
Flag indicating to use the Student’s t in inference.
- **kwargs
Additional keyword arguments used to initialize the results.
- model
See also
RegressionResults
Results store for WLS and GLW models.
Notes
Most of the methods and attributes are inherited from RegressionResults. The special methods that are only available for OLS are:
get_influence
outlier_test
el_test
conf_int_el
Methods
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 a set of linear restrictions.
compare_lr_test
(restricted[, large_sample])Likelihood ratio test to test whether restricted model is correct.
conf_int
([alpha, cols])Compute the confidence interval of the fitted parameters.
conf_int_el
(param_num[, sig, upper_bound, …])Compute the confidence interval using Empirical Likelihood.
cov_params
([r_matrix, column, scale, cov_p, …])Compute the variance/covariance matrix.
el_test
(b0_vals, param_nums[, …])Test single or joint hypotheses using Empirical Likelihood.
f_test
(r_matrix[, cov_p, scale, invcov])Compute the F-test for a joint linear hypothesis.
Calculate influence and outlier measures.
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, **kwargs)Initialize (possibly re-initialize) a Results instance.
load
(fname)Load a pickled results instance
See specific model class docstring
outlier_test
([method, alpha, labels, order, …])Test observations for outliers according to method.
predict
([exog, transform])Call self.model.predict with self.params as the first argument.
Remove data arrays, all nobs arrays from result and model.
save
(fname[, remove_data])Save a pickle of this instance.
scale
()A scale factor for the covariance matrix.
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.
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.
Properties
White’s (1980) heteroskedasticity robust standard errors.
MacKinnon and White’s (1985) heteroskedasticity robust standard errors.
MacKinnon and White’s (1985) heteroskedasticity robust standard errors.
MacKinnon and White’s (1985) heteroskedasticity robust standard errors.
Akaike’s information criteria.
Bayes’ information criteria.
The standard errors of the parameter estimates.
The total (weighted) sum of squares centered about the mean.
Return condition number of exogenous matrix.
Heteroscedasticity robust covariance matrix.
Heteroscedasticity robust covariance matrix.
Heteroscedasticity robust covariance matrix.
Heteroscedasticity robust covariance matrix.
Return eigenvalues sorted in decreasing order.
The explained sum of squares.
The p-value of the F-statistic.
The predicted values for the original (unwhitened) design.
F-statistic of the fully specified model.
Log-likelihood of model
Mean squared error the model.
Mean squared error of the residuals.
Total mean squared error.
Number of observations n.
The two-tailed p values for the t-stats of the params.
The residuals of the model.
Residuals, normalized to have unit variance.
R-squared of the model.
Adjusted R-squared.
Sum of squared (whitened) residuals.
Return the t-statistic for a given parameter estimate.
Uncentered sum of squares.
Flag indicating to use the Student’s distribution in inference.
The residuals of the transformed/whitened regressand and regressor(s).