So far I have completed two separate steps in my modelling process:
- Calculated a Spearman’s Rank correlation matrix for my candidate variable set
- Calculated and ranked the % deviance explained (“pcdev”) for each of my candidate variables ("sorry, I don't have the requisite reputation +10 to post an image")
Now, I want to iteratively remove all correlated variables (i.e. >0.5) from my candidate variable set using the relative ranking of % deviance explained (or possibly AIC for that matter). That is, amongst a group of correlated candidate variables, the variable with the highest % deviance explained is retained in the candidate variable set. All others are removed.
Does anybody have any code they are willing to contribute?