How to remove effect of "in" predictors on "out" predictors in stepwiseregression?

2 vues (au cours des 30 derniers jours)
Qazi Haque
Qazi Haque le 3 Fév 2021
Commenté : Qazi Haque le 4 Fév 2021
Hi,
I am trying to understand how the effect of "in" predictors are removed from the "out" predictors in the native matlab code stepwisefit.m.
The code is doing the following but unfortunately I fail to understand why.
% Compute separate added-variable coeffs and their standard errors
xr = x - Q*(Q'*x); % remove effect of "in" predictors on "out" predictors
Any explanation as to what this is doing would be really helpful and highly appreciated.
Cheers,
Qazi

Réponses (1)

Jeff Miller
Jeff Miller le 3 Fév 2021
One way to think of it is that the "out" predictors will only improve the fit of the regression model if they bring in some new information not already provided by the "in" predictors. The "new" information provided by each "out" predictor is, by definition, information that is not already predictable from the "in" variables. So, to 'remove effect of "in" predictors on "out" predictors' is to extract the new information (xr) from the "out" predictors. The next step in the analysis will then be to see whether this new information actually improves predictions.
Hope that helps...
  3 commentaires
Jeff Miller
Jeff Miller le 4 Fév 2021
No, sorry, I haven't gone through the computations in the code.
Qazi Haque
Qazi Haque le 4 Fév 2021
No worries Jeff, thanks.

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by