You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ENH collect tools for linear restrictions, constraints, contrasts #1668
same or similar to Kerby's reparameterization,
Stata has function makecns — Constrained estimation with technical details in the (P) manual
Note: Stata calculates the LS estimate in the transformed model, but reports the results in the original parameterization.
implication: cov_params has reduced rank (rank(exog) - k_constraints)
see #1131 for numerical reasons why we might want to temporarily internally transform for estimation.
Similar: Ridge Regression works with standardized and orthogonalized variables internally, in the description in articles.
Also PCR can report results in the original parameterization, instead of in factor space.
additionally on imposing linear restrictions R params = q through transformation
In Stata, if q != 0 this is an affine, and not a linear transformation params = T dot params_reduced + a
where T is the linear transformation matrix and a is a constant.
Which means we cannot just run OLS with the reparameterized exog.
base._constraints has transform_params_constraint (I found it now because it has zero unit test coverage.)
to go from unconstrained to constrained estimate.
This was intended somewhere for one-step methods or as starting parameter for restricted estimation, e.g. likelihood ratio test for imposing restrictions, dropping variables.
bump for transform_params_constraint
I did not remember whether or where I had parked this. Also, a reference would be helpful, I don't remember where I saw this, most likely it's in several text books.
It would be useful to have also the corresponding cov_params for the constrained params
Activity
josef-pkt commentedon May 15, 2014
Two background docs (that I never worked my way through)
http://statsmodels.sourceforge.net/devel/contrasts.html
http://patsy.readthedocs.org/en/latest/categorical-coding.html
josef-pkt commentedon May 15, 2014
same or similar to Kerby's reparameterization,
Stata has function
makecns— Constrained estimation with technical details in the (P) manualNote: Stata calculates the LS estimate in the transformed model, but reports the results in the original parameterization.
implication: cov_params has reduced rank (rank(exog) - k_constraints)
see #1131 for numerical reasons why we might want to temporarily internally transform for estimation.
Similar: Ridge Regression works with standardized and orthogonalized variables internally, in the description in articles.
Also PCR can report results in the original parameterization, instead of in factor space.
josef-pkt commentedon May 16, 2014
additionally on imposing linear restrictions
R params = qthrough transformationIn Stata, if
q != 0this is an affine, and not a linear transformationparams = T dot params_reduced + awhere
Tis the linear transformation matrix andais a constant.Which means we cannot just run OLS with the reparameterized exog.
josef-pkt commentedon Mar 21, 2018
this issue is a bit outdated
see #4361 for the contrast/restriction part and links to other issues
imposing linear or affine restrictions has been implemented in
fit_constrainedfor model with an offset (GLM and count models)josef-pkt commentedon May 26, 2018
one item where I don't know where it should go:
base._constraints has
transform_params_constraint(I found it now because it has zero unit test coverage.)to go from unconstrained to constrained estimate.
This was intended somewhere for one-step methods or as starting parameter for restricted estimation, e.g. likelihood ratio test for imposing restrictions, dropping variables.
josef-pkt commentedon Mar 15, 2023
bump for
transform_params_constraintI did not remember whether or where I had parked this. Also, a reference would be helpful, I don't remember where I saw this, most likely it's in several text books.
It would be useful to have also the corresponding cov_params for the constrained params
There is a version for multivariate linear model. #8722
e.g. for MANOVA type multivariate constraints L B M = C
Berndt, Ernst R., and N. Eugene Savin. “Conflict among Criteria for Testing Hypotheses in the Multivariate Linear Regression Model.” Econometrica 45, no. 5 (1977): 1263–77. https://doi.org/10.2307/1914072.
Kubáček, Lubomír. “Multivariate Regression Model with Constraints.” Mathematica Slovaca 57, no. 3 (June 1, 2007): 271–96. https://doi.org/10.2478/s12175-007-0022-7.