if (FALSE) {
# load dataset cornell
data(cornell)
# apply plsreg1
myplsr1 = plsreg1(cornell[,1:7], cornell[,8,drop=FALSE])
# plot variables (circle of correlations)
plot(myplsr1, what="variables")
# plot observations (as points) using components (t1,u1)
plot(myplsr1, what="observations", comps=c(1,1), where=c("t","u"))
# plot observations with names using components (t1,u1)
plot(myplsr1, what="observations", comps=c(1,1),
where=c("t","u"), show.names=TRUE)
# plot observations (as points) using components (t1,t2)
plot(myplsr1, what="observations", comps=c(1,2), where=c("t","t"))
# plot observations (as points) using components (u1,u2)
plot(myplsr1, what="observations", comps=c(1,2), where=c("u","u"))
}
Run the code above in your browser using DataLab