similar to: Discrepancies in the estimates of Partial least square (PLS) in SAS and R

Displaying 20 results from an estimated 3000 matches similar to: "Discrepancies in the estimates of Partial least square (PLS) in SAS and R"

2011 Oct 21
1
R square and F - stats in PLS
In the lm function the summary(lmobject) we have adjusted.r square and f statistics Do we have similar to the pls package and how to get it -- View this message in context: http://r.789695.n4.nabble.com/R-square-and-F-stats-in-PLS-tp3924484p3924484.html Sent from the R help mailing list archive at Nabble.com.
2012 Sep 19
0
Discrepancies in weighted nonlinear least squares
Dear all, I encounter some discrepancies when comparing the deviance of a weighted and unweigthed model with the AIC values. A general example (from 'nls'): DNase1 <- subset(DNase, Run == 1) fm1DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1) This is the unweighted fit, in the code of 'nls' one can see that 'nls' generates a vector
2005 May 12
1
pls -- crossval vs plsr(..., CV=TRUE)
Hi, Newbie question about the pls package. Setup: Mac OS 10.3.9 R: Aqua GUI 1.01, v 2.0.1 I want to get R^2 and Q^2 (LOO and Leave-10-Out) values for each component for my model. I was running into a few problems so I played with the example a little and the results do not match up with the comments in the help pages. $ library(pls) $ data(NIR) $ testing.plsNOCV <- plsr(y ~ X, 6, data =
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 =
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 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 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
2010 Jul 07
2
R2 function from PLS to use a model on test data
Hello, I am having some trouble using a model I created from plsr (of train) to analyze each invididual R^2 of the 10 components against the test data. For example: mice1 <- plsr(response ~factors, ncomp=10 data=MiceTrain) R2(mice1) ##this provides the correct R2 for the Train data for 10 components ## Now my next objective is to calculate my model's R2 for each component on the
2012 Feb 21
2
Dataframes in PLS package
I have been working with the pls procedure and have problems getting the procedure to work with matrix or frame data. I suspect the problem lies in my understanding of frames, but can't find anything in the documentation that will help. Here is what I have done: I read in an 10000 x 8 table of data, and assign the first four columns to matrix A and the second four to matrix B pls <-
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
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 <-
2006 Aug 25
1
R.squared in Weighted Least Square using the Lm Function
Hello all, I am using the function lm to do my weighted least square regression. model<-lm(Y~X1+X2, weight=w) What I am confused is the r.squared. It does not seem that the r.squared for the weighted case is an ordinary 1-RSS/TSS. What is that precisely? Is the r.squared measure comparable to that obtained by the ordinary least square? <I also notice that model$res is the unweighted
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
2011 Apr 29
0
Least square with Bounds
Hi, Anybody knows how I can go about solving a linear least square problem with bounds? In Matlab I can use lsqlin but I haven't been able to get anything in R. Appreciate your help! -- View this message in context: http://r.789695.n4.nabble.com/Least-square-with-Bounds-tp3484741p3484741.html Sent from the R help mailing list archive at Nabble.com.
2011 Jun 28
0
Weighted Least Square Model for a Binary Outcome
Dear R Users, I would like to use R to fit a Weighted Least Square model for a binary outcome, say Y. The model is the one widely used for a binary dependent variable when the logistic model has not been proposed. Does anyone know how to specify the weight as the square root of 1/(E(Y)(1-E(Y)) in lm() or any other regression functions? I know that varPower() in the package of gls() can provide
2012 Jan 18
1
Non-linear Least Square Optimization -- Function of two variables.
Dear All, In the past I have often used minpack (http://bit.ly/zXVls3) relying on the Levenberg-Marquardt algorithm to perform non-linear fittings. However, I have always dealt with a function of a single variable. Is there any difference if the function depends on two variables? To fix the ideas, please consider the function f(R,N)=(a/(log(2*N))+b)*R+c*N^d, where a,b,c,d are fit parameters. For
2011 Jan 12
0
Bootstrapping to Correct Standard Errors in Two-Stage Least Square Estimation
Dear friends I want to estimate an equation using two-stage least square but suspect that the model suffers from autocorrelation. Can someone please advise how to implement bootstrapping method in order to calculate the correct standard errors in R? Thank you. Kind regards Thanaset -- View this message in context:
2009 Sep 01
2
Mantel test least square line
Hello, I performed a Mantel test and plotted communitiy similarities. I would like to add a least square line. I thought about using abline taking as slope the r-statistic of the Mantel test and calculating the y-intercept analytically. Is this method correct? Is there any function for this calculation? Thank you -- View this message in context:
2011 Jun 24
0
a Weighted Least Square model for a binary response variable
Dear R Users, I would like to use R to fit a Weighted Least Square model for a binary response variable, say Y. The model is actually the model widely used for a binary dependent variable when the logistic model has not been invented. The weight is 1/(E(Y)(1-E(Y)). Could someone help me out? Thanks for any replies in advance! Best Regards, Vivian
2010 Dec 06
1
use pcls to solve least square fitting with constraints
Hi, I have a least square fitting problem with linear inequality constraints. pcls seems capable of solving it so I tried it, unfortunately, it is stuck with the following error: > M <- list() > M$y = Dmat[,1] > M$X = Cmat > M$Ain = as.matrix(Amat) > M$bin = rep(0, dim(Amat)[1]) > M$p=qr.solve(as.matrix(Cmat), Dmat[,1]) > M$w = rep(1, length(M$y)) > M$C = matrix(0,0,0)