statistics - Partial Least Square Regression using R -
i'm new r. want use "pls" package partial least square analysis on data.
the data information design elements, whether exist or not, in 0 , 1 , last column contains emotion score. want find design elements contribute emotion.
from example found on internet, need call
> plsr(density ~ nir, 6, data=yarn, validation="cv")
when try this:
plsr(density ~ nir, 6, data=mydata, validation="cv")
i error:
error: object 'nir' not found
how call function correctly using data?
thank in advance
this works me (i downloaded pastebin , saved file called "junk.dat")
dat <- read.csv("junk.dat") library("pls") summary(plsr(adorable~.,data=dat))
the formula adorable~.
says adorable
(your last column name) response variable , of remaining columns in data frame should used predictors.
Comments
Post a Comment