I am using PLS-DA to build a discriminant model to classify a binary variable (coded as 0/1). Can you please tell me how extract the variance explained/contributed that each predictor contribute to the prediction model?
I am have a looked at the plotLoadings and selectVar but they seemed to not produce what I want.
@christoa 's answer will get you what you want. I thought I would just chime in to clarify a couple things.
plotLoadings() uses a barplot to depict the contribution - or “loadings” - of each input variable has to the variates yielded by the sPL-DA model. The variates are essentially linear combinations of the input variables and the loadings are the coefficients of this linear combination (more info here).
If you wish to look at the proportion of predictor variance explained by each variate, the splsda object has a component prop_expl_var which will yield exactly that. In the above code, you would access this with: splsda.result$prop_expl_var
VIP (Variable Importance in Projection) differs from the loading values as it measures the importance of each variable in explaining the predictors’ variance.
Hopefully this helped with your understanding a bit.