My mentor asked me to use PLSR in R to analyze some data he had sitting around. I used the pls package and created a mvr workspace object using the following syntax:
posamodel <- plsr(posa ~ ados_css + sex_info + age_mdevhist_match + kbit_iqstand_score +
evt_ss_std + scq_total_score + tomi_total + qpq_conflict_sum +
spp_c_a_t_social + spp_c_a_p_social + spp_c_a_s_social + cabs_total +
DANVA_faces_total + DANVA_voices_total + Cz.Voices_N100.L +
Cz.Voices_N100.V + P7.Faces_N170_AVG.L + P8.Faces_N170_AVG.L +
LPC_Correct_avg + LPC_Incorrect_avg + LPC_diff_correct_incorrect +
nega + lowa, data=data, validation="CV")
I examined validation plots using the following:
validationplot(posamodel)
Judging by this, I determined the correct number of components to be 6.
Here's where my trouble is. I want to know, for N=6 components, which variables map onto which component. I can't seem to find an easy way to do this with pls, although it seems like a basic functionality. Is there something I'm missing?
I tried loadings(posamodel) and tried specifying NCOMP = 6 (I tried both in the initial PLSR command and in the loadings command) This looks like it's getting closer to what I want, but my attempts at specifying 6 components didn't work.