statsmodels.robust.robust_linear_model.RLMResults

class statsmodels.robust.robust_linear_model.RLMResults(model, params, normalized_cov_params, scale)[source]

Class to contain RLM results

Attributes
bcov_scaledndarray

p x p scaled covariance matrix specified in the model fit method. The default is H1. H1 is defined as k**2 * (1/df_resid*sum(M.psi(sresid)**2)*scale**2)/ ((1/nobs*sum(M.psi_deriv(sresid)))**2) * (X.T X)^(-1)

where k = 1 + (df_model +1)/nobs * var_psiprime/m**2 where m = mean(M.psi_deriv(sresid)) and var_psiprime = var(M.psi_deriv(sresid))

H2 is defined as k * (1/df_resid) * sum(M.psi(sresid)**2) *scale**2/ ((1/nobs)*sum(M.psi_deriv(sresid)))*W_inv

H3 is defined as 1/k * (1/df_resid * sum(M.psi(sresid)**2)*scale**2 * (W_inv X.T X W_inv))

where k is defined as above and W_inv = (M.psi_deriv(sresid) exog.T exog)^(-1)

See the technical documentation for cleaner formulae.

bcov_unscaledndarray

The usual p x p covariance matrix with scale set equal to 1. It is then just equivalent to normalized_cov_params.

bsendarray

An array of the standard errors of the parameters. The standard errors are taken from the robust covariance matrix specified in the argument to fit.

chisqndarray

An array of the chi-squared values of the parameter estimates.

df_model

See RLM.df_model

df_resid

See RLM.df_resid

fit_historydict

Contains information about the iterations. Its keys are deviance, params, iteration and the convergence criteria specified in RLM.fit, if different from deviance or params.

fit_optionsdict

Contains the options given to fit.

fittedvaluesndarray

The linear predicted values. dot(exog, params)

modelstatsmodels.rlm.RLM

A reference to the model instance

nobsfloat

The number of observations n

normalized_cov_paramsndarray

See specific model class docstring

paramsndarray

The coefficients of the fitted model

pinv_wexogndarray

See RLM.pinv_wexog

pvaluesndarray

The p values associated with tvalues. Note that tvalues are assumed to be distributed standard normal rather than Student’s t.

residndarray

The residuals of the fitted model. endog - fittedvalues

scalefloat

The type of scale is determined in the arguments to the fit method in RLM. The reported scale is taken from the residuals of the weighted least squares in the last IRLS iteration if update_scale is True. If update_scale is False, then it is the scale given by the first OLS fit before the IRLS iterations.

sresidndarray

The scaled residuals.

tvaluesndarray

The “t-statistics” of params. These are defined as params/bse where bse are taken from the robust covariance matrix specified in the argument to fit.

weightsndarray

The reported weights are determined by passing the scaled residuals from the last weighted least squares fit in the IRLS algorithm.

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, scale, invcov])

Compute the F-test for a joint linear hypothesis.

initialize(model, params, **kwargs)

Initialize (possibly re-initialize) a Results instance.

load(fname)

Load a pickled results instance

normalized_cov_params()

See specific model class docstring

predict([exog, transform])

Call self.model.predict with self.params as the first argument.

remove_data()

Remove data arrays, all nobs arrays from result and model.

save(fname[, remove_data])

Save a pickle of this instance.

summary([yname, xname, title, alpha, return_fmt])

This is for testing the new summary setup

summary2([xname, yname, title, alpha, …])

Experimental summary function 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.

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.

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, scale, invcov])

Compute the F-test for a joint linear hypothesis.

initialize(model, params, **kwargs)

Initialize (possibly re-initialize) a Results instance.

load(fname)

Load a pickled results instance

normalized_cov_params()

See specific model class docstring

predict([exog, transform])

Call self.model.predict with self.params as the first argument.

remove_data()

Remove data arrays, all nobs arrays from result and model.

save(fname[, remove_data])

Save a pickle of this instance.

summary([yname, xname, title, alpha, return_fmt])

This is for testing the new summary setup

summary2([xname, yname, title, alpha, …])

Experimental summary function 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.

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

bcov_scaled

bcov_unscaled

bse

chisq

fittedvalues

llf

Log-likelihood of model

pvalues

resid

sresid

tvalues

Return the t-statistic for a given parameter estimate.

use_t

Flag indicating to use the Student’s distribution in inference.

weights