similar to: R2 function from PLS to use a model on test data

Displaying 20 results from an estimated 500 matches similar to: "R2 function from PLS to use a model on test data"

2010 Jul 08
4
Column header strategy
Hopefully simple question: What is the best way to name, and treat factor columns for data that has lots of columns? This is my column list: id pID50 D.1 D.2 D.3 D.4 D.5 , etc. all the way to D.185 I was under the impression from several R examples in pls that if you name your columns like above, you should be able to simply call all the D factors with "D", instead of going in and
2017 Jul 13
3
How to formulate quadratic function with interaction terms for the PLS fitting model?
I have two ideas about it. 1- i) Entering variables in quadratic form is done with the command I (variable ^ 2) - plsr (octane ~ NIR + I (nir ^ 2), ncomp = 10, data = gasTrain, validation = "LOO" You could also use a new variable NIR_sq <- (NIR) ^ 2 ii) To insert a square variable, use syntax I (x ^ 2) - it is very important to insert I before the parentheses. iii) If you want to
2011 May 17
1
Help with PLSR with jack knife
Hi I am analysing a dataset of 40 samples each with 90,000 intensity measures for various peptides. I am trying to identify the Biomarkers (i.e. most significant peptides). I beleive that PLS with jack knifing, or alternativeley CMV(cross-model-validation) are multivariateThe 40 samples belong to four different groups. I have managed to conduct the plsr using the commands: BHPLS1 <-
2017 Jul 13
4
Quadratic function with interaction terms for the PLS fitting model?
poly(NIR, degree = 2) will work if NIR is a matrix, not a data.frame. The degree argument apparently *must* be explicitly named if NIR is not a numeric vector. AFAICS, this is unclear or unstated in ?poly. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom
2017 Jul 13
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
Below. -- Bert Bert Gunter On Thu, Jul 13, 2017 at 3:07 AM, Luigi Biagini <luigi.biagini at gmail.com> wrote: > I have two ideas about it. > > 1- > i) Entering variables in quadratic form is done with the command I > (variable ^ 2) - > plsr (octane ~ NIR + I (nir ^ 2), ncomp = 10, data = gasTrain, validation = > "LOO" > You could also use a new variable
2011 May 12
1
Fw: Help with PLSR
Hi I am attempting to use plsr which is part of the pls package in r. I amconducting analysis on datasets to identify which proteins/peptides are responsible for the variance between sample groups (Biomarker Spoting) in a multivariate fashion. I have a dataset in R called "FullDataListTrans". as you can see below the structure of the data is 40 different rows representing a
2017 Jul 13
0
Quadratic function with interaction terms for the PLS fitting model?
> On Jul 13, 2017, at 10:43 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > > poly(NIR, degree = 2) will work if NIR is a matrix, not a data.frame. > The degree argument apparently *must* be explicitly named if NIR is > not a numeric vector. AFAICS, this is unclear or unstated in ?poly. I still get the same error with: library(pld) data(gasoline) gasTrain <-
2017 Jul 13
2
Quadratic function with interaction terms for the PLS fitting model?
Dear all, I am using the pls package of R to perform partial least square on a set of multivariate data. Instead of fitting a linear model, I want to fit my data with a quadratic function with interaction terms. But I am not sure how. I will use an example to illustrate my problem: Following the example in the PLS manual: ## Read data data(gasoline) gasTrain <- gasoline[1:50,] ## Perform
2017 Jul 16
2
How to formulate quadratic function with interaction terms for the PLS fitting model?
> On Jul 13, 2017, at 7:43 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > > Below. > > -- Bert > Bert Gunter > > > > On Thu, Jul 13, 2017 at 3:07 AM, Luigi Biagini <luigi.biagini at gmail.com> wrote: >> I have two ideas about it. >> >> 1- >> i) Entering variables in quadratic form is done with the command I >>
2009 Aug 28
2
Pls package
Hi, I have managed to format my data into a single datframe consisting of two AsIs response and predictor dataframes in order to supply the plsr command of the pls package for principal components analysis. When I execute the command, however, I get this error: > fiber1 <- plsr(respmat ~ predmat, ncomp=1, data=inputmat,validation="LOO") Error in model.frame.default(formula =
2011 May 18
1
Help with Memory Problems (cannot allocate vector of size)
While doing pls I found the following problem > BHPLS1 <- plsr(GroupingList ~ PCIList, ncomp = 10, data = PLSdata, jackknife = >FALSE, validation = "LOO") when not enabling jackknife the command works fine, but when trying to enable jackknife i get the following error. >BHPLS1 <- plsr(GroupingList ~ PCIList, ncomp = 10, data = PLSdata, jackknife = >TRUE,
2017 Jul 13
0
Quadratic function with interaction terms for the PLS fitting model?
> On Jul 12, 2017, at 6:58 PM, Ng, Kelvin Sai-cheong <kscng at connect.hku.hk> wrote: > > Dear all, > > I am using the pls package of R to perform partial least square on a set of > multivariate data. Instead of fitting a linear model, I want to fit my > data with a quadratic function with interaction terms. But I am not sure > how. I will use an example to
2017 Dec 05
2
PLS in R
Hello, I need help with a partial least square regression in R. I have read both the vignette and the post on R bloggers but it is hard to figure out how to do it. Here is the script I wrote: library(pls) plsrcue<- plsr(cue~fb+cn+n+ph+fung+bact+resp, data = cue, ncomp=7, na.action = NULL, method = "kernelpls", scale=FALSE, validation = "LOO", model = TRUE, x = FALSE, y =
2017 Jul 16
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
?? If I haven't misunderstood, they are completely different! 1) NIR must be a matrix, or poly(NIR,...) will fail. 2) Due to the previously identified bug in poly, degree must be explicitly given as poly(NIR, degree =2,raw = TRUE). Now consider the following example: > df <-matrix(runif(60),ncol=3) > y <- runif(20) > mdl1 <-lm(y~df*I(df^2)) > mdl2
2013 Mar 02
2
caret pls model statistics
Greetings, I have been exploring the use of the caret package to conduct some plsda modeling. Previously, I have come across methods that result in a R2 and Q2 for the model. Using the 'iris' data set, I wanted to see if I could accomplish this with the caret package. I use the following code: library(caret) data(iris) #needed to convert to numeric in order to do regression #I
2007 Jul 06
1
about R, RMSEP, R2, PCR
Hi, I want to calculate PLS package in R. Now I want to calculate R, MSEP, RMSEP and R2 of PLSR and PCR using this. I also add this in library of R. How I can calculate R, MSEP, RMSEP and R2 of PLSR and PCR in R. I s any other method then please also suggest me. Simply I want to calculate these value. Thanking you. -- Nitish Kumar Mishra Junior Research Fellow BIC, IMTECH, Chandigarh, India
2017 Jul 13
0
Quadratic function with interaction terms for the PLS fitting model?
Bert, The 'degree' argument follows the "..." argument in the function declaration: poly(x, ..., degree = 1, coefs = NULL, raw = FALSE, simple = FALSE) Generally, any arguments after the "..." must be explicitly named, but as per the Details section of ?poly: "Although formally degree should be named (as it follows ...), an unnamed second argument of length 1
2005 Sep 04
2
Help: PLSR
Hello, I have a data set with 15 variables (first one is the response) and 1200 observations. Now I use pls package to do the plsr as below. trainSet = as.data.frame(scale(trainSet, center = T, scale = T)) trainSet.plsr = mvr(formula, ncomp = 14, data = trainSet, method = "kernelpls", model = TRUE, x = TRUE, y = TRUE) from the model, I wish to know the
2017 Jul 13
2
Quadratic function with interaction terms for the PLS fitting model?
Marc: 1. I am aware of the need to explicitly name arguments after ... -- see the R Language definition where this can be inferred from the argument matching rules. 2. I am aware of the stated exception for poly(). However: > x1 <- runif(20) > x2 <- runif(20) > mx <- cbind(x1,x2) > poly(mx,2) Error in poly(dots[[i]], degree, raw = raw, simple = raw) : 'degree'
2008 Oct 20
1
Calculate SPE in PLS package
Dear list, I want to calculate SPE (squared prediction error) in x-space, can someone help? Here are my codes: fit.pls<- plsr(Y~X,data=DAT,ncomp=3,scale=T,method='oscorespls',validation="CV",x= T) actual<-fit.pls$model$X pred<-fit.pls$scores %*% t(fit.pls$loadings) SPE.x<-rowSums((actual-pred)^2) Am I missing something here? Thanks in advance. Stella Sim