6.7.7. statsmodels.sandbox.regression.penalized

linear model with Theil prior probabilistic restrictions, generalized Ridge

Created on Tue Dec 20 00:10:10 2011

Author: Josef Perktold License: BSD-3

open issues * selection of smoothing factor, strength of prior, cross validation * GLS, does this really work this way * None of inherited results have been checked yet,

I’m not sure if any need to be adjusted or if only interpretation changes One question is which results are based on likelihood (residuals) and which are based on “posterior” as for example bse and cov_params
  • helper functions to construct priors?
  • increasing penalization for ordered regressors, e.g. polynomials
  • compare with random/mixed effects/coefficient, like estimated priors

there is something fishy with the result instance, some things, e.g. normalized_cov_params, don’t look like they update correctly as we search over lambda -> some stale state again ?

I added df_model to result class using the hatmatrix, but df_model is defined in model instance not in result instance. -> not clear where refactoring should occur. df_resid doesn’t get updated correctly. problem with definition of df_model, it has 1 subtracted for constant

6.7.7.1. Functions

atleast_2dcols(x)
coef_restriction_diffbase(n_coeffs[, ...])
coef_restriction_diffseq(n_coeffs[, degree, ...])
coef_restriction_meandiff(n_coeffs[, ...])
next_odd(d)

6.7.7.2. Classes

GLS(endog, exog[, sigma, missing, hasconst]) Generalized least squares model with a general covariance structure.
OLS(endog[, exog, missing, hasconst]) A simple ordinary least squares model.
RegressionResults(model, params[, ...]) This class summarizes the fit of a linear regression model.
TheilGLS(endog, exog, r_matrix[, q_matrix, ...]) GLS with probabilistic restrictions
TheilRegressionResults(model, params[, ...])