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
BUG/ENH: LM, score_test variable addition with redundant variables (rank) #5364
I'm running a variable addition GLM.score_test res_glm.model.score_test(res_glm.params, exog_extra=bs.basis_)
to test the addition of splines when the current model includes the linear term.
The score test uses the number of columns as the number of restriction, while the actual addition is smaller because of the repeated subspace.
bs.basis_ includes the basis functions for two variables. Those two are included as linear terms in res_glm.model. Each basis includes the linear function as a linear combination of basis functions.
The constant has been removed from basis function, so only the two linear/trend terms are "duplicated".
#4716 is the PR to add score_test as a public method.
I don't remember whether it handles reduced rank, collinearity or redundancy in the variable addition and in constraints.
Activity
josef-pkt commentedon Nov 2, 2018
#4716 is the PR to add score_test as a public method.
I don't remember whether it handles reduced rank, collinearity or redundancy in the variable addition and in constraints.
josef-pkt commentedon Nov 2, 2018
#1061 is a related case for the diagnostic lm tests with categorical, i.e.
x**2 == xwhich creates reduced rank withing the test design/exog array.josef-pkt commentedon Feb 13, 2023
check if this is still relevant for score_test.
related: rank reduced number of constraints in anova and similar #8512
BUG: Use the rank of exog_extra as the number of constraints in score…