[R] pls package

2016-03-15 Thread cindy Guo
Hi All, I am using the cppls function in the pls package, and I want to use cross validation to determine the best number of components. Since Hastie et al recommended a "one standard error rule", i.e., choose the most parsimonious model whose error is no more than one standard error above the err

Re: [R] help plsr function

2014-06-24 Thread cindy Guo
Ok, yes, I can match them now. Thank you very much! On Tue, Jun 24, 2014 at 3:58 AM, Bjørn-Helge Mevik wrote: > annie Zhang writes: > > > ## the predicted scores from the model > > (pred <- predict(data.cpls,n.comp=1:2,newdata=x.new,type="score")) > > ## the predicted scores using x%*%projec

[R] calculate probability circles

2011-04-26 Thread cindy Guo
Hi, All, I want to have the 1%, 2%, 3%, ... contours for Dirichlet distribution. I need the exact contour circles (mathematically) instead of contour plots. Can anyone help me with this? Many thanks, Cindy [[alternative HTML version deleted]] ___

Re: [R] integration

2011-04-09 Thread cindy Guo
-boun...@r-project.org] On > Behalf Of cindy Guo [cindy.g...@gmail.com] > Sent: Friday, April 08, 2011 9:21 PM > To: r-help@r-project.org > Subject: [R] integration > > Hi, All, > > I have a density function with 3 variables which is defined on some > irregular domain, an

[R] integration

2011-04-08 Thread cindy Guo
Hi, All, I have a density function with 3 variables which is defined on some irregular domain, and I want to get the marginal distribution of each variable. Is there any function doing this? A simple example is p(x,y,z)=x*y*z*I(xy>z). So each marginal distribution is a function of the other two v

Re: [R] pairs

2009-11-16 Thread cindy Guo
Thank you. I will check that. Cindy On Mon, Nov 16, 2009 at 1:45 PM, cls59 wrote: > > > David Winsemius wrote: > > > > ?order > > > > cindy Guo wrote: > > > > Do you mean if the numbers in each row are ordered? They are not, but if > > it&#x

Re: [R] pairs

2009-11-16 Thread cindy Guo
Do you mean if the numbers in each row are ordered? They are not, but if it's needed, we can order them. The matrix only has 5000 rows. On Mon, Nov 16, 2009 at 1:34 PM, David Winsemius wrote: > > On Nov 16, 2009, at 2:32 PM, cindy Guo wrote: > > I forgot to say that there ar

Re: [R] pairs

2009-11-16 Thread cindy Guo
s right. In fact, I'm pretty sure the last step taking >> only the first half of the list is wrong. I also do not know if you have >> considered how you want to count situations like: >> >> 3 2 7 4 5 7 ... >> 7 3 8 6 1 2 9 2 .. >> >> How many "p

Re: [R] pairs

2009-11-15 Thread cindy Guo
> > > > On Nov 15, 2009, at 8:06 PM, David Winsemius wrote: > > I could of course be wrong but have you yet specified the number of >> columns for this pairing exercise? >> >> On Nov 15, 2009, at 5:26 PM, cindy Guo wrote: >> >> Hi, All, >>> >

Re: [R] pairs

2009-11-15 Thread cindy Guo
Hi, Charlie, Thank you for the reply. Maybe I don't need the frequency of each pair. I only need the top, say 50, pairs with the highest frequency. Is there anyway which can avoid calculating for all the pairs? Thanks, Cindy On Sun, Nov 15, 2009 at 4:18 PM, cls59 wrote: > > &g

[R] pairs

2009-11-15 Thread cindy Guo
Hi, All, I have an n by m matrix with each entry between 1 and 15000. I want to know the frequency of each pair in 1:15000 that occur together in rows. So for example, if the matrix is 2 5 1 6 1 7 8 2 3 7 6 2 9 8 5 7 Pair (2,6) (un-ordered) occurs together in rows 1 and 3. I want to return the val

[R] SSVS

2009-09-14 Thread cindy Guo
Hi, ALL, Is there any R/bioconductor package to do SSVS (stochastic search variable selection) for glm? Thanks, Cindy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEAS

Re: [R] matrix power

2009-08-10 Thread cindy Guo
mall eigenvalue and 1/sqrt(x) for the others. > > On Mon, Aug 10, 2009 at 6:36 PM, cindy Guo wrote: > > Hi, Ted, > > > > Thanks for the sample code. It is exactly what I want. But can I ask > another > > question? The matrix for which I want the negative square roo

Re: [R] matrix power

2009-08-10 Thread cindy Guo
> On > > Behalf Of cindy Guo > > Sent: Monday, August 10, 2009 2:32 PM > > To: r-help@r-project.org > > Subject: [R] matrix power > > > > Hi, All, > > > > If I have a symmetric matrix, how can I get the negative square root of > the > > mat

Re: [R] matrix power

2009-08-10 Thread cindy Guo
Hi, Ted, Now I understand the problem. Thank you for the explanation. It's very helpful. I appreciate it. Cindy On Mon, Aug 10, 2009 at 3:58 PM, Ted Harding wrote: > On 10-Aug-09 22:36:03, cindy Guo wrote: > > Hi, Ted, > > Thanks for the sample code. It is exactly what I

Re: [R] matrix power

2009-08-10 Thread cindy Guo
function cov has a lot of negative eigenvalues, like -5.338634e-17, so 1/sqrt(V) generates NA's. Can you tell what's the problem here. Thanks, Cindy On Mon, Aug 10, 2009 at 2:53 PM, Ted Harding wrote: > On 10-Aug-09 21:31:30, cindy Guo wrote: > > Hi, All, > > If I hav

[R] matrix power

2009-08-10 Thread cindy Guo
Hi, All, If I have a symmetric matrix, how can I get the negative square root of the matrx, ie. X^(-1/2) ? Thanks, Cindy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help P

[R] nearest neighbors

2009-08-09 Thread cindy Guo
Hi, All, I am wondering if there is any package which can give the index of the k nearest neighbors. Thank you, Cindy [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEAS

[R] diagonal LDA and QDA

2009-08-01 Thread cindy Guo
Hi, all, I am wondering if there is any package doing lda and qda which allows assuming diagonal covariance matrices. I checked the lda function in MASS, and it seems it does not support this. Thanks, Cindy [[alternative HTML version deleted]] __

[R] diagonal LDA and QDA

2009-08-01 Thread cindy Guo
Hi, all, I am wondering if there is any package doing lda and qda which allows assuming diagonal covariance matrices. I checked the lda function in MASS, and it seems it does not support this. Thanks, Cindy [[alternative HTML version deleted]] __

[R] diagonal lda and qda

2009-08-01 Thread cindy Guo
Hi, all, I am wondering if there is any package doing lda and qda which allows assuming diagonal covariance matrices. I checked the lda function in MASS, and it seems it does not support this. Thanks, Cindy [[alternative HTML version deleted]] __

Re: [R] install package from CRAN

2009-07-28 Thread cindy Guo
ly. I don't know how to deal with it when I don't have enough privilege. Cindy On Tue, Jul 28, 2009 at 7:33 PM, stephen sefick wrote: > What was the problem- out of curiosity? > > Stephen Sefick > > On Tue, Jul 28, 2009 at 9:23 PM, cindy Guo wrote: > > Hi, >

Re: [R] install package from CRAN

2009-07-28 Thread cindy Guo
Hi, Thank you for all your replies. I got it work now. Cindy On Tue, Jul 28, 2009 at 6:09 PM, Dirk Eddelbuettel wrote: > > Cindy, > > On 28 July 2009 at 17:15, cindy Guo wrote: > | I have a very basic question about install packages from CRAN on unix. I > | only installed

Re: [R] install package from CRAN

2009-07-28 Thread cindy Guo
d to set the path? Cindy On Tue, Jul 28, 2009 at 5:31 PM, Steve Lianoglou < mailinglist.honey...@gmail.com> wrote: > > On Jul 28, 2009, at 8:15 PM, cindy Guo wrote: > > Hi, >> >> I have a very basic question about install packages from CRAN on unix. I >&g

[R] install package from CRAN

2009-07-28 Thread cindy Guo
Hi, I have a very basic question about install packages from CRAN on unix. I only installed on Windows before. Should I use the command install.package? The error message I got is syntax error near unexpected token `"mvtnorm"' Is it because I didn't set the path? Which path should I specify? Than

Re: [R] local regression using loess

2009-07-28 Thread cindy Guo
Bert, Ryan, Alain, You suggestions are very helpful. Thank you. I learned a lot from the discussion. Cindy On Tue, Jul 28, 2009 at 8:53 AM, Ryan wrote: > Bert Gunter gene.com> writes: > > > > > > > Actually, loess is much more than an "interpolant". I wouldn't > > even call it that. It is a

Re: [R] local regression using loess

2009-07-27 Thread cindy Guo
Hi, Ryan, Thank you for the information. I tried it. But there are some error messages. When I use fit <- locfit(Y~X1*X2,family='binomial'), the error message is error lfproc(x, y, weights = weights, cens = cens, base = base, geth = geth, : compparcomp: parameters out of bounds And when I use

Re: [R] local regression using loess

2009-07-27 Thread cindy Guo
n...@r-project.org] > On > Behalf Of cindy Guo > Sent: Monday, July 27, 2009 4:06 PM > To: r-help@r-project.org > Subject: [R] local regression using loess > > Hi, All, > > I have a dataset with binary response ( 0 and 1) and some numerical > covariates. I know I can use logist

[R] local regression using loess

2009-07-27 Thread cindy Guo
Hi, All, I have a dataset with binary response ( 0 and 1) and some numerical covariates. I know I can use logistic regression to fit the data. But I want to consider more locally. So I am wondering how can I fit the data with 'loess' function in R? And what will be the response: 0/1 or the probabi

Re: [R] normal mixture model

2009-07-27 Thread cindy Guo
; to see what's there (unfortunately this is not fully documented). > > For more detail see the help pages. > > Hope this helps, > > Christian > > On Sun, 26 Jul 2009, cindy Guo wrote: > > Hi, Christian, >> >> Thank you for the reply. I just tried

Re: [R] normal mixture model

2009-07-26 Thread cindy Guo
e number of components and hierarchical clustering for initialisation). > > Christian > > > On Sun, 26 Jul 2009, cindy Guo wrote: > > Hi, All, >> >> I want to fit a normal mixture model. Which package in R is best for this? >> I >> was using the pac

[R] normal mixture model

2009-07-26 Thread cindy Guo
Hi, All, I want to fit a normal mixture model. Which package in R is best for this? I was using the package 'mixdist', but I need to group the data into groups before fitting model, and different groupings seem to lead to different results. What other package can I use which is stable? And are the

[R] mixdist package in R

2009-07-26 Thread cindy Guo
Hi, All, I fitted a 3-component normal mixture model with the mixdist package in R. How can I get the density of a new data after I fit the model? Is there any function to do it? Thanks, Cindy [[alternative HTML version deleted]] __ R-help@r-

[R] question about mean

2009-02-08 Thread cindy Guo
Hello, everyone, I have a matrix like following: school value A .1 A .2 A .15 A .2 B .3 B .5 C .3 C .3 C .4 C .5 C .6 C .9 C 1 I want to get the mean 'value' for each 'school', b

[R] how to call a C-library in R

2008-08-23 Thread cindy Guo
Hi, everyone, I need to use a C library. But since I have little experience in C, I want to call this C library in R and program the rest in R. Does anyone know how to do this? Thanks, Cindy [[alternative HTML version deleted]] __ R-help@r-pr

Re: [R] R-package install

2008-07-25 Thread cindy Guo
was a source package I > sugest you look into Uwe Ligges' win-builder service mentioned in that > manual (and in 'Writing R Extensions'). > > On Thu, 24 Jul 2008, cindy Guo wrote: > > Hi, Mark, >> Thank you for your response. >> No, I don't know

Re: [R] R-package install

2008-07-24 Thread cindy Guo
Can you do that? > > Which package is it? > > Regards, Mark. > > > cindy Guo wrote: > > > > Hi, I have a R package, which is a .tar.tar file. And it is said to be > > source code for all platforms. And the author said it should install on > > any >

[R] R-package install

2008-07-24 Thread cindy Guo
Hi, I have a R package, which is a .tar.tar file. And it is said to be source code for all platforms. And the author said it should install on any system (but he didn't know about Windows). I am wondering if I can use this package in Windows R. Thank you, Cindy [[alternative HTML version d

[R] truncated normal

2008-07-23 Thread cindy Guo
Hi, I want to generate random samples from truncated normal say Normal(0,1)Indicator((0,1),(2,4)). It has more than one intervals. In the library msm, it seems to me that the 'lower' and 'upper' arguments can only be a number. I tried rtnorm(1,mean=0,sd=1, lower=c(0,2),upper=c(1,4)) and it didn't w