[P] Help with PLS in R
Hello r/MachineLearning ~
Struggling Noob here. I have been asked to create a pls model on a dataset with 200 predictor variables and 1 response variable(y below). I have only 16 observations. I know the n is small and predictors are high, but these are outside of my control.
I have made a model, with the code below, but I have little confidence it is right. I don’t know how to properly test it. The summary says after 2 components, 95% is explained.
- How do I see what variables are in those components.
- How do I test the model pls.fit or determine the R^2
Thank you so much for any help. If anyone has strong knowledge here, I’d be happy to pay for a quick tutoring session.
<- plsr(df$y~.,data = df, scale = TRUE,validation = "LOO")