Re: [R] How to personalize the rpart function: t.default(x)

2004-09-02 Thread Prof Brian Ripley
On Thu, 2 Sep 2004, Simone Vantini wrote: I'm trying to personalize the rpart function by introducing a list('init','split','eval') in the argument method. But I receive an error message:Error in t.default(x): argument is not a matrix. Can anyone tell me what the argument of this function is

Re: [R] [R/S] question re solution

2004-09-02 Thread Peter Dalgaard
Erin Hodgess [EMAIL PROTECTED] writes: a - 0.5*(outer(1:n3,1:n3,function(x,y,n2.=n2){n2. - pmax(x,y)})) Why doesn't this work please? Because defaults are expressions to be evaluated in the function's evaluation frame (i.e. the expression could depend on x and y for instance). When you

[R] glmm

2004-09-02 Thread Niko Speybroeck
I am trying to use R. My question is if R can calculate a random effect probit model {e.g. glmm} but including sampling weights. I am desperately looking for a random effect model but wanted to use it on survey data. Thanks for an answer: Niko Speybroeck.

Re: [R] glmm

2004-09-02 Thread Dimitris Rizopoulos
Hi Niko, look at functions `GLMM' (package: lme4) and `glmmPQL' (package: MASS). Best, Dimitris Dimitris Rizopoulos Doctoral Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/16/396887 Fax:

[R] cross-correlations

2004-09-02 Thread Molins, Jordi
Hello, I have been looking around in past helps about cross-correlations for a set of n time series. Although you can do it by yourself calculating the out-of-the-diagonal terms in the cross correlation matrix by using pairwise combinations of ccf and the diagonal terms by using acf, this does

RE: [R] glmm

2004-09-02 Thread Niko Speybroeck
Hi Dimitris, Thanks a lot for the answer! I see that in glmm you can specify weight= but this is according to me corresponding to for example the frequency of a certain observation and not to an weighing factor because of the sampling design. Tell me if I'm wrong. Do you have an example with GLMM

Re: [R] cross-correlations

2004-09-02 Thread Prof Brian Ripley
On Thu, 2 Sep 2004, Molins, Jordi wrote: I have been looking around in past helps about cross-correlations for a set of n time series. Although you can do it by yourself calculating the out-of-the-diagonal terms in the cross correlation matrix by using pairwise combinations of ccf and the

[R] [OT]Example Data for Non-statisticians

2004-09-02 Thread Kevin Wang
(Sorry for the slightly off topic post) I'm giving a talk (on data mining) to some non-statisticians (who're all postgrad students, but a mixture of Science and Commerce majors). My intention is to show them the importance of statistics when doing data mining. What I'm thinking of doing is

[R] Two xtable Questions

2004-09-02 Thread Kevin Wang
Hi, These are two problems I've never seen when I used xtable() before... R 1.9.1 for Windows XP, xtable version 1.2-3: final.df Loci ChrMarker Position P.values Deviance DF 1 Idd5 1 D1Mit181 42.6 0.0011 103.21 78 2 Idd6/19/20 6 D6Mit374

[R] newsgroup on R

2004-09-02 Thread Bin Jiang
HI, I wonder if there is a newsgroup on R available, instead of emaillist which I have to receive mails daily. Cheers. Bin __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] Imputing missing values

2004-09-02 Thread Jan Smit
Many thanks to Dimitris Rizopoulos, Mahbub Latif, Manoj, and Frank Harrell for their suggestions and comments. Dimitris' code gave me what I wanted. The data pertain to an impact evaluation of 32 irrigation projects. For each project, there is little variability in the price farmers receive for

RE: [R] newsgroup on R

2004-09-02 Thread Wayne Jones
Check out: http://cran.r-project.org/doc/Rnews/ -Original Message- From: Bin Jiang [mailto:[EMAIL PROTECTED] Sent: 02 September 2004 12:09 To: [EMAIL PROTECTED] Subject: [R] newsgroup on R HI, I wonder if there is a newsgroup on R available, instead of emaillist which I have to

Re: [R] newsgroup on R

2004-09-02 Thread Chuck Cleland
You can follow the emails on this list via a news server: http://gmane.org/info.php?group=gmane.comp.lang.r.general Bin Jiang wrote: HI, I wonder if there is a newsgroup on R available, instead of emaillist which I have to receive mails daily. -- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd

Re: [R] newsgroup on R

2004-09-02 Thread Bin Jiang
HI, by newsgroup, I mean a kind of user forum like MATLABs http://newsreader.mathworks.com/WebX?14@@/comp.soft-sys.matlab where anyone can post a question, without receiving unnecessary emails daily Chuck Cleland wrote: You can follow the emails on this list via a news server:

Re: [R] [OT]Example Data for Non-statisticians

2004-09-02 Thread Frank E Harrell Jr
Kevin Wang wrote: (Sorry for the slightly off topic post) I'm giving a talk (on data mining) to some non-statisticians (who're all postgrad students, but a mixture of Science and Commerce majors). My intention is to show them the importance of statistics when doing data mining. What I'm thinking

RE: [R] newsgroup on R

2004-09-02 Thread Liaw, Andy
If I'm not mistaken, that's what gmane does. AFAIK there's not a usenet group on R, but gmane makes R-help look like one. Andy From: Bin Jiang HI, by newsgroup, I mean a kind of user forum like MATLABs http://newsreader.mathworks.com/WebX?14@@/comp.soft-sys.matlab where anyone can post

Re: [R] newsgroup on R

2004-09-02 Thread Kevin Wang
Hi, On Thu, 2 Sep 2004, Bin Jiang wrote: HI, I wonder if there is a newsgroup on R available, instead of emaillist which I have to receive mails daily. AFAIK the answer is no. I think this has been brought up and discussed a few years ago and the idea was kind of...rejected. Kevin

Re: [R] newsgroup on R

2004-09-02 Thread Thomas Petzoldt
Bin Jiang wrote: HI, by newsgroup, I mean a kind of user forum like MATLABs http://newsreader.mathworks.com/WebX?14@@/comp.soft-sys.matlab where anyone can post a question, without receiving unnecessary emails daily Hi, gmane.org IS a gateway from and to a newsgroup system in the original (NNTP)

[R] Problems with heatmap.2

2004-09-02 Thread michael watson (IAH-C)
Hi When I give the command: heatmap.2(as.matrix(d),Rowv=as.dendrogram(hc.gene),Colv=FALSE,scale=row ,trace=none,col=greenred.colors(79)) The resulting heatmap has re-ordered my columns! This is time-course data, and I don't want my columns re-ordered! Note from the help: Rowv:

Re: [R] Problems with heatmap.2

2004-09-02 Thread Sean Davis
Didn't test this, but I think you probably want to do dendrogram=row,Colv=1:n where n is the number of samples. Sean On Sep 2, 2004, at 9:21 AM, michael watson (IAH-C) wrote: Hi When I give the command: heatmap.2(as.matrix(d),Rowv=as.dendrogram(hc.gene),Colv=FALSE,scale=ro w

Re: [R] newsgroup on R

2004-09-02 Thread Henrik Andersson
Try news.gmane.org There you'll find gmane.comp.lang.r.general and gmane.emacs.ess.general /Henrik Bin Jiang wrote: HI, I wonder if there is a newsgroup on R available, instead of emaillist which I have to receive mails daily. Cheers. Bin __ [EMAIL

Re: [R] glmm

2004-09-02 Thread Thomas Lumley
On Thu, 2 Sep 2004, Dimitris Rizopoulos wrote: Hi Niko, look at functions `GLMM' (package: lme4) and `glmmPQL' (package: MASS). Yes, but they don't take sampling weights. We had this discussion a while back for linear mixed models and no-one had a really satisfactory solution. In contrast

[R] trivial question about nested loops

2004-09-02 Thread dan roberts
Hello, It's a trivial question but I haven't found a solution in the full reference manual. How can I make the code below run? Would an array/matrix solution be faster? Please provide a short example, if possible. Thanks in advance, dan for (k in 1:5)

RE: [R] glmm

2004-09-02 Thread Niko Speybroeck
Thanks a lot for you answer Thomas. Do you have a reference which supports this solution? Can you give an example of a weight that depends on variables that shouldn't be in the model? Van: Thomas Lumley [mailto:[EMAIL PROTECTED] Verzonden: do 2/09/2004 16:15

Re: [R] trivial question about nested loops

2004-09-02 Thread Duncan Murdoch
On Thu, 2 Sep 2004 07:26:31 -0700 (PDT), dan roberts [EMAIL PROTECTED] wrote : Hello, It's a trivial question but I haven't found a solution in the full reference manual. How can I make the code below run? Probably most easily if f was a list of lists (see solution 1 below). Would an

[R] corARMA

2004-09-02 Thread Duncan Lee
I want to create a general AR(p) correlation matrix and I'm using the corARMA function to do this. The problem is that whenever the correlation coefficients at the different lags sum to more than 1, the function returns an error. Any ideas how I can fix this? Duncan Lee University of Bath

RE: [R] glmm

2004-09-02 Thread Baskin, Robert
I believe in the earlier discussion it was Spencer Graves that pointed out that there is earlier work by DuMouchel using design information but not weights as predictors. The reference for the use of design weights as predictors is: Start insert from earlier email 9. Pfeffermann, D. , Skinner,

RE: [R] glmm

2004-09-02 Thread Thomas Lumley
On Thu, 2 Sep 2004, Niko Speybroeck wrote: Thanks a lot for you answer Thomas. Do you have a reference which supports this solution? Can you give an example of a weight that depends on variables that shouldn't be in the model? Robert Baskin has answered some of this. Additional points 1)

[R] Question on survey package

2004-09-02 Thread Richard Valliant
Is there a way to use one of the functions in the survey package to get a table of estimated percentages (or proportions) and the standard error for each? For example, suppose that AGECODE AND SEX are two factors with 5 and 2 levels. The 5x2 AGECODE x SEX table would have the estimated

Re: [R] trivial question about nested loops

2004-09-02 Thread dan roberts
Duncan, I tried your solutions and they almost work. The problem seems to be d$Y[k]. When I run the code with d$Y[k], I get an empty matrix (all 0s). However, if I replace d$Y[k] with, for example, dY4, then I get a matrix with one of the results I am looking for. Do you have any idea how I could

Re: [R] trivial question about nested loops

2004-09-02 Thread Gabor Grothendieck
dan roberts bro092 at yahoo.com writes: : I tried your solutions and they almost work. The problem seems : to be d$Y[k]. When I run the code with d$Y[k], I get an empty : matrix (all 0s). However, if I replace d$Y[k] with, for example, : dY4, then I get a matrix with one of the results I am

Re: [R] trivial question about nested loops

2004-09-02 Thread Duncan Murdoch
On Thu, 2 Sep 2004 09:52:07 -0700 (PDT), dan roberts [EMAIL PROTECTED] wrote: Duncan, I tried your solutions and they almost work. The problem seems to be d$Y[k]. When I run the code with d$Y[k], I get an empty matrix (all 0s). However, if I replace d$Y[k] with, for example, dY4, then I get a

Re: [R] Question on survey package

2004-09-02 Thread Thomas Lumley
On Thu, 2 Sep 2004, Richard Valliant wrote: Is there a way to use one of the functions in the survey package to get a table of estimated percentages (or proportions) and the standard error for each? For example, suppose that AGECODE AND SEX are two factors with 5 and 2 levels. The 5x2

RE: [R] trivial question about nested loops

2004-09-02 Thread Berton Gunter
sum(paste(d$Y,k,sep=)*exp(-1i*j*d$X)) but I got Error in : non-numeric argument to binary operator It thought you were trying to multiply by the string d$Y1. There are a number of ways to evaluate a string as if it was code, but you don't really need those. Duncan

[R] suggestion for a small addition to the R-FAQ

2004-09-02 Thread Viktor Tron
Dear Kurt and R-ers, Short: please add info to the faq about how to make sure you have R and how to start up the interpreter (jump to the end) Long: I was gonna use the tool called UCS which requires R. So I wanted to make sure if our university system has it. I act before I ask so I thought I

[R] confidence intervals

2004-09-02 Thread Robert Waters
Dear R users; Im working with lme and Id like to have an idea of how can I get CI for the predictions made with the model. Im not a stats guy but, if Im not wrong, the CIs should be different if Im predicting a new data point or a new group. Ive been searching through the web and in help-lists

[R] cross random effects and PQL

2004-09-02 Thread
Dear friends, I have asked last few weeks about cross-random effects using PQL, but I have not receive any answer because might my question was not clear. My question was about analysing the salamander mating data using PQL. This data contain cross-random effects for (male) and for (female).

[R] Fixes for pls.pcr 0.2.2 plot.mvr(prediction)

2004-09-02 Thread Frank J. Iannarilli, Jr.
Hi, I just sent the following bugfixes to author Ron Wehrens, but thought I should also make them available here. This fixes the prediction plots, which are currently erroneous. === I found some bugs in the the plot.mvr() function, in the plottype=prediction section: 1.

[R] syntex about a nested mixed linear model

2004-09-02 Thread JongJoo Kim
I am a novice R user, and have been in trouble to get the right mixed model syntax in microarray analyses. There are three factors: Dye(2 levels), Temperature(3 levels) and Array(3 for each Temperature with a total of 9 arrays). I want to treat array as random, and to regard array variation

Re: [R] allocating memory in C, not in R

2004-09-02 Thread Sigal Blay
Below is a simplified version of my c function that I am currenctly using with a .C() call. The values that has to be returned to R are the three outVectors. If I need to convert .C to .Call, How do I do it based on myFunction below? Thank you for your help. void myFunction(char

[R] Printing output on Plot

2004-09-02 Thread Neil Leonard
Hi, I'm trying to print the p-values from the output of a CPH test onto a Kaplan Meier plot. Can this be done? I only really want the p-values from the CPH test to appear but if this can't be done I am willing to have the entire CPH output. This is what I am currently trying: (it doesn't

RE: [R] Printing output on Plot

2004-09-02 Thread Austin, Matt
The following example should get you started. library(survival) test1 - list(time= c(4, 3,1,1,2,2,3), status=c(1,NA,1,0,1,1,0), x= c(0, 2,1,1,1,0,0), sex= c(0, 0,0,0,1,1,1)) cpfit - coxph( Surv(time, status) ~ x + strata(sex), test1)