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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -