0
I’m developing a model and I wonder if anyone knows any packages that do stepwise and already measure the correlation between dependent variables, seeking the best model without high collinearity.
I’m using the package caret
with the functions findCorrelation
and developing the model with train(..., method = "glmStepAIC")
.
But I wanted a function that already measured everything at once and found the best model thinking first of the variables that best discriminate rather than first taking multicollinearity. I thought of a strategy to do this by running the glmStepAIC
and then test the collinearity, and I myself will remove the correlated variables prioritizing the most significant, run again the glmStepAIC
without the variables I removed, rechecking the correlation, once again removing the highly correlated ones prioritizing the power of discrimination and so on, but this process is very long/slow/repetitive. Does anyone know another medium or a function/package that does this automatically?
In addition, the
caret
can adjust models using the packageglmnet
, as we can see at this link.– Marcus Nunes