Re: [R] PLS in R

2017-12-06 Thread Bjørn-Helge Mevik
t; (pls values) Again, that depends on what you want with your model. -- Regards, Bjørn-Helge Mevik signature.asc Description: PGP signature __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-h

Re: [R] PLS in R

2017-12-12 Thread Bjørn-Helge Mevik
f course, but that you would have to implement yourself. :) -- Regards, Bjørn-Helge Mevik signature.asc Description: PGP signature __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] A strange problem using pls package

2015-07-27 Thread Bjørn-Helge Mevik
l of them in the formula (y ~ x1 + x2 + x3 + ...), or you can use the following shortcut to regress y on all the remaining coloumns: plsr(y ~ ., ..., data = mydata) -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more

Re: [R] - PLS-Package - PLSR loadings

2014-12-17 Thread Bjørn-Helge Mevik
any components (i.e., one starts to model "noise"), the coefficients of the last components get higher and higher.) -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/l

Re: [R] security using R at work

2018-08-09 Thread Bjørn-Helge Mevik
ssible (or at least very difficult) for sensitive information to leak out of the network. I would say that your best bet is to expect all analysis software to have security holes or be compromised, and design your setup/network around that assumption. -- Regards, Bjørn-Helge Mevik sig

Re: [R] time mathematics

2018-11-20 Thread Bjørn-Helge Mevik
Well, this is not an elegant (or robust) solution, but this would work for the example you give, at least: starttime <- as.POSIXct("2018-11-20 23:01:18") # Just pick a random date format(starttime + c(0:4), format = "%T") There are probably better ways. :) -- Reg

[R] [R-pkgs] pls 2.5-0 released

2015-08-22 Thread Bjørn-Helge Mevik
new argument `nrep'. See ?cvsegments for details. - It now has a vignette. - It now has a NEWS file that can be accessed by news(). -- Regards, Bjørn-Helge Mevik ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/ma

[R] Installing R 3.2.2 on machine with old libcurl

2015-10-15 Thread Bjørn-Helge Mevik
or message is still displayed, which can be confusing. Is there a way around this problem? Also, perhaps the useHTTPS option should default to FALSE if the libcurl capability is FALSE? -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing

Re: [R] Problems with data structure when using plsr() from package pls

2016-01-15 Thread Bjørn-Helge Mevik
u get this error if the n96 object was a data.frame instead of a matrix. Can you check with, e.g., > class(n96) If it says "data.frame", try using I(as.matrix(n96)). -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list -- To

Re: [R] Problems with data structure when using plsr() from package pls

2016-01-15 Thread Bjørn-Helge Mevik
variables you want in the model. -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html an

Re: [R] Problems with data structure when using plsr() from package pls

2016-01-18 Thread Bjørn-Helge Mevik
n96.1 n96.2 1 1 1 6 2 2 2 7 3 3 3 8 4 4 4 9 5 5 510 > dim(frame1) [1] 5 2 > names(frame1) [1] "gushVM" "n96" > rm(n96) > pls1 <- plsr(gushVM ~ n96, data = frame1) > pls1 Partial least squares

Re: [R] Version 3.2.3: package not available error with https

2016-03-01 Thread Bjørn-Helge Mevik
ALSE) }) in the Rprofile.site file, or your ~/.Rprofile. You still get a warning, but you do get the list of http repositories. Come to think about it: would it be an idea if R defaulted to useHTTPS = FALSE if capabilites("libcur") is FALSE? --

[R] [R-pkgs] pls 2.6-0 released

2016-12-18 Thread Bjørn-Helge Mevik
() for automatically suggesting the optimal number of components for the model. The function implements two different algorithms, and will optionally plot the RMSEP values and number of components. - A description of selectNcomp() has been added to the vignette. -- Regards, Bjørn-Helge

Re: [R] pls package - validation

2017-02-08 Thread Bjørn-Helge Mevik
onse and the prediction variables. (Or as they tend to say in chemometrics: You don't have a model.) > As I said, I think it better to follow up or complain about me on > stackexchange rather than here. Sorry, I read this too late. :) -- Regards, Bjørn-Helge Mevik signature.asc Des

Re: [R] Append to a vector?

2008-08-08 Thread Bjørn-Helge Mevik
Why not simply a <- c(a, 5) or a <- c(a, b) if b is another vector. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/p

Re: [R] NotePad++ Syntax file

2009-08-11 Thread Bjørn-Helge Mevik
"[Ricardo Rodriguez] Your XEN ICT Team" writes: > John Kane wrote: >> No but have you had a look at Tinn-R http://www.sciviews.org/Tinn-R/. > > Any similar option for Mac OS X? I guess you can use Emacs on Mac OS X. -- Bjørn-Helge Mevik

Re: [R] Pls package

2009-08-31 Thread Bjørn-Helge Mevik
They should be matrices instead of data frames, for instance by converting them like this: inputmat <- data.frame(respmat = I(as.matrix(foo)), predmat = I(as.matrix(bar))) As for missing values: the default behaviour of plsr is to omit cases with missing values. Th

Re: [R] cross-validation in plsr package

2010-02-22 Thread Bjørn-Helge Mevik
dation in the pls package does not propose a number of factors as optimum, you have to select this yourself. (The reason for this is that there is AFAIK no theoretically founded and widely accepted way of doing this automatically. I'd be happy to learn otherwise.) -- Regards, Bjø

Re: [R] CRAN + geography = Cranography

2009-07-31 Thread Bjørn-Helge Mevik
Barry Rowlingson writes: > http://www.maths.lancs.ac.uk/~rowlings/R/Cranography/ Absolutely beautiful! > Note this is just for fun. No warranties. Maybe I should use a little > 'R' as a marker. That would be cool. > Maybe I should get a life. :-)

[R] [R-pkgs] pls 2.4-3 released

2013-08-11 Thread Bjørn-Helge Mevik
r-visible changes: - In order to comply with current CRAN submission policies, pls.options() no longer stores the modified option list in the global environment. This has the effect that the options will have to be set every time R is started, even if the work space was saved an

Re: [R] Question about the prediction plot in pls package

2013-09-02 Thread Bjørn-Helge Mevik
els in the plot. If you wish to have them in the same panel, you will have to add the points yourself. This should work: plot(gas1, ncomp=2, asp = 1, line = TRUE) points(predict(gas1, ncomp = 2) ~ gasoline$octane, col = "red") -- Regards, Bjørn-Helge Mevik _

Re: [R] Question about R2 in pls package

2013-09-05 Thread Bjørn-Helge Mevik
ata it is indeed PCC^2, but _not_ for cross-validation or test data. IMHO, R^2 only has a meaningful interpretation for training data. For test data or cross-validation, I prefer MSEP or RMSEP. -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mai

[R] --enable-R-shlib and external BLAS/LAPACK libraries

2012-09-21 Thread Bjørn-Helge Mevik
t; /lib64/libgcc_s.so.1 (0x7ff526cb9000) libintlc.so.5 => /cluster/software/VERSIONS/intel-2011.10/composer_xe_2011_sp1/lib/intel64/libintlc.so.5 (0x7ff526b6a000) libc.so.6 => /lib64/libc.so.6 (0x7ff5267d7000) /lib64/ld-linux-x86-64.so.2 (0x00344520)

Re: [R] data structure for plsr

2012-10-05 Thread Bjørn-Helge Mevik
I(spec)) Then you can analyse like this: plsr(resp ~ spec, data = mydata, ) -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-g

Re: [R] help plsr function

2014-06-24 Thread Bjørn-Helge Mevik
projection[,1:2] will reproduce the values from predict(). -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] package(pls) - extracting explained Y-variance

2010-06-28 Thread Bjørn-Helge Mevik
yve <- 100 * drop(R2(object, estimate = "train", intercept = FALSE)$val) (For cross-validated or test set validated models, it uses RMSEP.) -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.et

[R] R at Supercomputing 10

2010-10-27 Thread Bjørn-Helge Mevik
"SC10 Disruptive Technology Preview: The First Cloud Portal to “R” and Beyond" http://www.hpcinthecloud.com/features/SC10-Disruptive-Technology-Preview--The-First-Cloud-Portal-to-R-and-Beyond-105776458.html?viewAll=y (My apologies if ths has been posted already.) -- Bjørn-H

Re: [R] R2 function from PLS to use a model on test data

2010-08-03 Thread Bjørn-Helge Mevik
this is equivalent to cor(y, yhat)^2, but not for test data or cross-validation. >From your second email, I would guess that MOE uses cor(y, yhat)^2 instead of 1 - SSE/SST. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.et

[R] Problems using external BLAS

2010-08-06 Thread Bjørn-Helge Mevik
./configure --prefix="/site/VERSIONS/R-$version" \ --with-blas="-L/site/intel/cmkl/8.1/lib/em64t -lmkl -lvml -lguide -lpthread" \ --with-lapack="-L/site/intel/cmkl/8.1/lib/em64t -lmkl_lapack64 -lmkl" \ --enable-R-shlib but we wanted to switch to g

Re: [R] Fw: Help with PLSR

2011-05-13 Thread Bjørn-Helge Mevik
g the coloumns in FullDataListTrans separate variables in the data frame.) BHPLS1 <- plsr(GroupingList ~ PCIList, ncomp = FeaturePresenceExpected[1], data = FullDataListTrans, validation = "LOO") -- Regards, Bjørn-Helge Mevik __ R-h

Re: [R] Help with PLSR with jack knife

2011-05-18 Thread Bjørn-Helge Mevik
sure of how to utilise these to identify the significant > variables. You can use the jackknife built into plsr to get an indication about significant variables, by adding the argument "jackknife = TRUE" to the plsr call. Use jack.test(BHPLS1) to do the test. But _PLEASE_ do read

Re: [R] help with PLSR Loadings

2011-05-18 Thread Bjørn-Helge Mevik
umbers. That is not surprising, since the variable names are PCIList1, PCIList2, etc., and the documentation for loadinplot says: with '"numbers"', the variable names are converted to numbers, if possible. Variable names of the forms '"number&qu

Re: [R] Help with plotting plsr loadings

2011-06-10 Thread Bjørn-Helge Mevik
ee the problem?? By using `labels = "numbers"', you are asking the plot function to convert the names "PCIList1" "PCIList2" "PCIList3" "PCIList4" ... to numbers. It doesn't know how to do that. (See ?loadingplot for the details.) Your o

Re: [R] Gasoline Data in pls package

2010-05-12 Thread Bjørn-Helge Mevik
and is a standard way of representing Near Infrared Reflectance measurements. [1] http://cran.r-project.org/doc/Rnews/Rnews_2006-3.pdf [2] J. H. Kalivas. Two data sets of near infrared spectra. Chemometrics and Intelligent Laboratory Systems, 37: 255–259, 1997. -- Regards, Bjørn-Helge Mevik ___

Re: [R] PLSR AND PCR ISSUES

2012-07-30 Thread Bjørn-Helge Mevik
You give us far too little information about what you do, what you want and what happens. Given that, the only help one can give is: Read the documentation. :) -- Regards, Bjørn-Helge Mevik, dr. scient, Research Computing Services, University of Oslo

Re: [R] plsr how to return my formula

2011-11-28 Thread Bjørn-Helge Mevik
Try to read the pls package article available here: http://www.jstatsoft.org/v18/i02/ -- Cheers, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] question about plsr() results

2011-12-02 Thread Bjørn-Helge Mevik
on to linear models in R, and you will come a long way. There is also a paper in JSS about the pls package: http://www.jstatsoft.org/v18/i02/ -- Cheers, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

[R] [R-pkgs] pls 2.3.0 released

2011-12-06 Thread Bjørn-Helge Mevik
+/-1 SE (since 2.2.0). See ?coefplot - The package now has a name space (since 2.2.0). -- Regards, Bjørn-Helge Mevik ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman/listinfo/r-packages

Re: [R] getting p-value and standard error in PLS

2011-10-19 Thread Bjørn-Helge Mevik
res (OLS) regression (the lm() function in R). There you get p-values automatically. Furthermore, a PLS regression with the same number of components as predictor variables is equivalent to OLS, so there seems no reason to use PLS at all in your case. -

Re: [R] use of segments in PLS

2011-10-21 Thread Bjørn-Helge Mevik
message says - matches multiple arguments, in this case "segment.type". -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] R square and F - stats in PLS

2011-10-21 Thread Bjørn-Helge Mevik
othesis tests and performance statistics. This is not how PLSR is usually applied, and there are few such tools. The traditional/typical focus amongst PLSR practicioners is much more on prediction performance (RMSEP) and interpretation by plotting scores and loadings. -- Regards,

Re: [R] Dataframes in PLS package

2012-03-05 Thread Bjørn-Helge Mevik
3 [2,]24 > ## Without I(): > d2 <- data.frame(A = A, B = B) > d2 A.1 A.2 B.1 B.2 1 1 3 2 4 2 2 4 3 5 > names(d2) [1] "A.1" "A.2" "B.1" "B.2" > d2$A NULL > d2$A.1 [1] 1 2 -- Regards, Bjørn-Helge Mevik _

Re: [R] Dataframes in PLS package

2012-03-05 Thread Bjørn-Helge Mevik
lsr(depy ~ indx, data=eqn) > > and this gives me [7] ERROR: object 'depy' not found because you are missing the I(as.matrix()). -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/lis

Re: [R] Dataframes in PLS package

2012-03-05 Thread Bjørn-Helge Mevik
if you have many, it will take a lot of typing, and make the formula handling part of plsr() take _ages_. Then using matrices is easier and faster. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

Re: [R] PLS Error message

2012-03-06 Thread Bjørn-Helge Mevik
newdata) and that yourdata$subX contains 501 coloumns, but yournewdata$subX only contains 73 coloumns. You must supply a newdata with the same number of coloumns as in the modelling data. -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list

Re: [R] PLS predict

2012-03-06 Thread Bjørn-Helge Mevik
Thomas Möckel writes: > I have a question about understanding PLS. If I use the predict function of R > than it seems to me the function only uses the last latent variable to model > new Y values. But should the function not use all latent variables to model > new Y´s? It should, and it definite

Re: [R] Dataframes in PLS package

2012-02-21 Thread Bjørn-Helge Mevik
stead of c(), or simply say A <- pls[,1:4] B <- pls[,5:8] The the rest should work. Btw. it is probably a good idea to avoid single-character names for variables. Especially c and C, because they are names of functions in R. -- Regards, Bjørn-Helge Mevik _

Re: [R] Discrepancies in the estimates of Partial least square (PLS) in SAS and R

2012-05-03 Thread Bjørn-Helge Mevik
27;t say anything about which R package you use for PLSR (and since I don't have access to SAS), I can only guess. :) -- Regards, Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] Discrepancies in the estimates of Partial least square (PLS) in SAS and R

2012-05-04 Thread Bjørn-Helge Mevik
lement of 'scale'. If 'scale' is 'TRUE', X is scaled by dividing each variable by its sample standard deviation. If cross-validation is selected, scaling by the standard deviation is done for every segment. When in doubt, read the documentat

Re: [R] Help in using PCR

2008-07-01 Thread Bjørn-Helge Mevik
not too large. With many variables (>> 1000), R will spend a very long time dealing with the formula. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http:/

Re: [R] Help in using PCR

2008-07-02 Thread Bjørn-Helge Mevik
a.frame(resp = cancerv1[, 408], VARS = I(as.matrix(cancerv1[, 2:407]))) otherwise data.frame() will split the matrix into single coloumn variables. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] Help in using PCR

2008-07-02 Thread Bjørn-Helge Mevik
es, I haven't found any difference between having the matrices with class "AsIs" and "matrix". -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] significant variables in GPLS ?

2008-04-24 Thread Bjørn-Helge Mevik
knowledge) not known. Any significance deduced from them should therefore be regarede as merely indicators. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] mvr error in PLS package

2007-11-27 Thread Bjørn-Helge Mevik
strange. Actually, as of version 2.0-0, mvr() etal should cope with factors without problems. They will be coded just as in lm(). Another thing to try is to say traceback() just after receiving the error message. That might tell you more about _where_ the error occurred. -- Bjørn-Helge Mev

Re: [R] Fortran Code to R Code

2007-11-28 Thread Bjørn-Helge Mevik
The `Writing R Extensions', chapter 5 `System and foreign language interfaces' tells you how to compile and run Fortran code from R. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

Re: [R] Different results in calculating SD of 2 numbers

2008-01-16 Thread Bjørn-Helge Mevik
# why it is different from 0.15? -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Calculate SPE in PLS package

2008-10-20 Thread Bjørn-Helge Mevik
, fit.pls$Xmeans, "+") would give you what you want. Note, however, that this will calculate the _fitted_ SPE, not the cross-validated SPE. The crossvalidation implemented in the pls package does not save the cross-validated scores/loadings -- that would consume too much memory. (C

Re: [R] R command line

2008-10-21 Thread Bjørn-Helge Mevik
"Raphael Saldanha" <[EMAIL PROTECTED]> writes: > Is there a Gui for R with improvements in the command line? I'm not looking > for buttons, menus and etc, but (more) colored syntax, auto-complete > commands and etc? ESS in Emacs, p

Re: [R] PCA functions

2009-02-16 Thread Bjørn-Helge Mevik
"glenn" writes: > Is there a function (before I try and write it !) that allows the input of a > covariance or correlation matrix to calculate PCA, rather than the actual > data as in princomp() Yes, there is: princomp(). :-) --

Re: [R] PLS regression on near infrared (NIR) spectra data

2009-03-04 Thread Bjørn-Helge Mevik
k to suggest me? There is the package 'pls', with Principal Component Regression (PCR) and Partial Least Squares Regression (PLSR). It also contains a couple of plots that are useful for princomp() or prcomp() analyses (PCA). -- Bjørn-Helge Mevik __

Re: [R] package pls

2008-10-31 Thread Bjørn-Helge Mevik
ations and performance changes). I don't recall if the criterion was cov or cov^2, but I believe they should be identical (up to sign). -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEAS

Re: [R] What is RDA file and how to open it in R program?

2007-09-24 Thread Bjørn-Helge Mevik
the file. The best idea is probably to ask the one(s) who created the file. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guid

Re: [R] a bug when subtracting vectors?

2007-09-24 Thread Bjørn-Helge Mevik
A good answer is found in the FAQ for R, in FAQ 7.31 Why doesn't R think these numbers are equal? -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://

Re: [R] Who uses R?

2007-09-26 Thread Bjørn-Helge Mevik
ting in 1964: Cambridge autocode, >algol, phoenix, machine-code, Fortran, BBC-Basic, >GLIM, GENSTAT, Linux, S-Plus and finally (probably >the best so far!) R." Well, calling Linux a computer language will probably not add too much credibility to the

Re: [R] Compute R2 and Q2 in PLS with pls.pcr package

2007-10-24 Thread Bjørn-Helge Mevik
e following to get R^2 and cross-validated R^2 (A.K.A. Q^2): mypls <- plsr(Ytrain ~ Xtrain, ncomp = 1, validation="LOO") ## R^2: R2(mypls, estimate = "train") ## cross-validated R^2: R2(mypls) ## Both: R2(mypls, estimate = "all") -- Bjørn-Helge Mevik

[R] [R-pkgs] pls version 2.1-0

2007-10-26 Thread Bjørn-Helge Mevik and Ron Wehrens
See the file CHANGES in the sources for all changes. -- Bjørn-Helge Mevik and Ron Wehrens ___ R-packages mailing list [EMAIL PROTECTED] https://stat.ethz.ch/mailman/listinfo/r-packages __ R-help@r-project