Re: [R] How to use the whole dataset (including between events) in Cox model (time-varying covariates) ?

2004-08-12 Thread Prof Brian Ripley
This is the consequence of the use of partial likelihood in the Cox model. You should read the literature on this point (for example, have you read Cox, 1972 and all its discussion, or Anderson, Borgan, Gill & Keiding?). It is not an R question. You need to make more assumptions, such as a smoot

Re: [R] Fwd: Timebased predictions in postgresql.

2004-08-12 Thread Christian Schulz
Hi, hints for your r-related day ahead predictions you find in the second part of Louis Torgo's very usefuel: DataMining with R http://www.liacc.up.pt/~ltorgo/ DataMiningWithR/PDF/DataMiningWithR.pdf And for your PL/SQL intention: http://www.omegahat.org/RSPostgres/ christian Am Donnersta

RE: [R] Object oriented programming resources

2004-08-12 Thread Vadim Ogranovich
The Bioconductor project posts a short tutorial "A guide to using S4 Objects" under "Developer Page" frame. I've found it useful. Note that R-s S4-classes approach to OOP is very different from the one of C++ or Java. Yet you will find member vars, they are called slots. > -Original Message-

[R] Object oriented programming resources

2004-08-12 Thread Matthew Walker
Hi, I'm looking for resources to read about the object-oriented features of R. I have looked through the "Manuals" page on r-project.org. The most useful of the documents seemed to be the "draft of the R language definition". However it had only about 6 pages on the topic. I have also used Go

Re: [R] Error Using pm.getabst()

2004-08-12 Thread lars
Robert, Thank you for your reply. I thought RSXML was an R (CRAN) package? I realize your package is part of bioconductor so I'll try the bioconductor mailing list as well. Also and more importantly I took your suggestion and stepped through the calls. It seems the failure in pm.getabst() oc

[R] pnorm, qnorm

2004-08-12 Thread David Duffy
Trenkler, Dietrich said: > > I found the following strange behavior using qnorm() and pnorm(): > > > x<-8.21;x-qnorm(pnorm(x)) > [1] 0.0004638484 > > x<-8.28;x-qnorm(pnorm(x)) > [1] 0.07046385 > > x<-8.29;x-qnorm(pnorm(x)) > [1] 0.08046385 > > x<-8.30;x-qnorm(pnorm(x)) > [1] -Inf > qnorm(1-.Machi

[R] coxph question

2004-08-12 Thread Mayeul KAUFFMANN
> I have many variables to test using cox model (coxph), and I am only interested in those variables with p value less than 0.01. Is there a quick way to do this automatically instead of looking at the output of each variable? > Chris I guess you need covariate selection. for a lengthy discussion

[R] How to use the whole dataset (including between events) in Cox model (time-varying covariates) ?

2004-08-12 Thread Mayeul KAUFFMANN
Hello, coxph does not use any information that are in the dataset between event times (or "death times") , since computation only occurs at event times. For instance, removing observations when there is no event at that time in the whole dataset does not change the results: > set.seed(1) > data

[R] coxph question

2004-08-12 Thread Man, Chris T.
Hi all, I have many variables to test using cox model (coxph), and I am only interested in those variables with p value less than 0.01. Is there a quick way to do this automatically instead of looking at the output of each variable? Plus, is there a method in R that I could adjust the multiple t

Re: [R] Error Using pm.getabst()

2004-08-12 Thread Robert Gentleman
You will almost surely do better to ask about Bioconductor packages on the Bioconductor mailing list. Next, it is helpful to know what versions of things you are using. As for your problem, did you look to see what kind of object absts is? There seems to be no default method for xmlRoot, and it is

Re: [R] correlation structures in NLME

2004-08-12 Thread Prof Brian Ripley
On Thu, 12 Aug 2004, Michael Jerosch-Herold wrote: > I am using the latest version of R on a Windows machine and get the > following error when I try to initialize a correlation structure with > the function corAR1 in NLME. This example is taken from the book of > Pinheiro and Bates, so it should

[R] correlation structures in NLME

2004-08-12 Thread Michael Jerosch-Herold
I am using the latest version of R on a Windows machine and get the following error when I try to initialize a correlation structure with the function corAR1 in NLME. This example is taken from the book of Pinheiro and Bates, so it should work. What is going wrong? > library(nlme) > data(Orthodont

[R] Error Using pm.getabst()

2004-08-12 Thread larsenmtl
R Users: After installing Bioconductor, RSXML and all the relevant Win32 DLLs (libxml2, zlib, iconv), I receive the following error message when using pm.getabst() Error in xmlRoot(absts) : no applicable method for "xmlRoot" I receive this when using the example from help(pm.getabst). Downlo

RE: [R] hclust-segmentation fault

2004-08-12 Thread Medvedovic, Mario (medvedm)
Thanks a lot for the assistance. It was an installation mistake - apparently we did not have BLAS libraries installed. The compiler did not seem to have been a problem in this case, althought it is an older version (gcc 3.3.1). Mario. >-Original Message- >From: Prof Brian Ripley [mailto:[

[R] Fwd: Timebased predictions in postgresql.

2004-08-12 Thread Nicolai Petri
Hi r-people :) I'm sorry to disturb but I must admit that I know amazingly little about R and similar statistics-packages/languages and I'm kind of lost on where to start. I'm currently working on a datacollection framework for postgresql (The db doesn't really matter except that I hope to use P

Re: [R] .Random.seed error

2004-08-12 Thread Prof Brian Ripley
On Thu, 12 Aug 2004, Richard Urbano wrote: > I have this snippet of code from an example in Dr. Harrel's book "Regression > Modeling Strategies" p 501 That's in a section called `S-PLUS Examples'. ^^ > n<-2000 > .Random.seed <-c(49,39,17,36,23,0,43,51,6,54,50,1) >

[R] .Random.seed error

2004-08-12 Thread Richard Urbano
I have this snippet of code from an example in Dr. Harrel's book "Regression Modeling Strategies" p 501 n<-2000 .Random.seed <-c(49,39,17,36,23,0,43,51,6,54,50,1) age <-50 + 12 * rnorm(n) age I get the error message: Error in rnorm(n) : .Random.seed[1] is NOT a valid RNG kind (code)

Re: [R] truly object oriented programming in R

2004-08-12 Thread Thomas Lumley
On Thu, 12 Aug 2004, Seth Falcon wrote: > The thing that's very different from, say, Java is that everything is an > object in R --- there isn't a notion of a *reference* to an object, > which is why in the above I had to say "head <- insertNode(...)" where > as in Java you could pass in a referen

Re: [R] truly object oriented programming in R

2004-08-12 Thread Thomas Lumley
On Thu, 12 Aug 2004, Jason Liao wrote: > Dear Thomas, > Thank you very much again for taking time to answer my questions. I am > sorry that my knoweldge of R is limited as I have only learned what is > necessary to do my work. In the KD tree, we have this recursive data > structure in that each kn

[R] [R-pkgs] updated package ineq 0.2-4

2004-08-12 Thread Achim Zeileis
Dear useRs, my last announcement is an update of the ineq package for measuring inequality, concentration and poverty. The current version is now 0.2-4. Thanks to suggestions from Rein Halbersma the Pen() function for plotting Pen's parade was improved and now allows for much more flexibility. Se

[R] [R-pkgs] updated package strucchange 1.2-4

2004-08-12 Thread Achim Zeileis
Dear useRs, the strucchange package for testing for structural change has been updated: the current version is 1.2-4. The most significant additions were two functions gefp() and efpFunctional(). gefp() implements a class of generalized M-fluctuation tests for testing for parameter instability or

[R] [R-pkgs] "new" package zoo 0.2-0

2004-08-12 Thread Achim Zeileis
Dear useRs, yet another "new" package: zoo 0.2-0. zoo provides a simple S3 class and methods for totally ordered indexed observations such as irregular time series. Although there are other packages for irregular time series available on CRAN (Giles Heywood's its package and irts() in Adrian Tra

[R] [R-pkgs] "new" package sandwich 0.1-3

2004-08-12 Thread Achim Zeileis
Dear useRs, here is the announcement for the next "new" package: sandwich 0.1-3. sandwich provides heteroskedasticity (and autocorrelation) consistent covariance matrix estimators (also called HC and HAC estimators). The former are implemented in the function vcovHC() (which was available in str

[R] [R-pkgs] "new" package fortunes 1.0-3

2004-08-12 Thread Achim Zeileis
Dear useRs, I used the summer months to work on all of my packages, and so this is the first of a sequence of announcements of "new" or updated packages. The "new" packages are new in the sense that previous versions had been on CRAN for some months but hadn't been announced to the R community vi

Re: [R] truly object oriented programming in R

2004-08-12 Thread Gabor Grothendieck
Jason Liao yahoo.com> writes: > In the KD tree, we have this >[...] > recursive data structure? If yes, can you give a sample program? > For an example, see the R loess.smooth function which uses k-d trees. Try ?loess.smooth for info and just type loess.smooth like that exactly to see s

Re: [R] truly object oriented programming in R

2004-08-12 Thread Seth Falcon
Hi Jason, On Thu, Aug 12, 2004 at 10:20:14AM -0700, Jason Liao wrote: > Does R's list support this recursive data structure? If yes, can you > give a sample program? Not sure if this is what you are looking for, but here's a quick linked list example using R's lists. # -8<---

[R] rgl snapshot command

2004-08-12 Thread Joern Kamradt
Hi, I am using the rgl package for 3D display. Unfortunately, I am not able to get the snapshot command running. I tried the following: > example(rgl.surface) rgl.sr> data(volcano) rgl.sr> y <- 2 * volcano rgl.sr> x <- 10 * (1:nrow(y)) rgl.sr> z <- 10 * (1:ncol(y)) rgl.sr> ylim <- range(y) rgl.sr

Re: [R] truly object oriented programming in R

2004-08-12 Thread Jason Liao
Dear Thomas, Thank you very much again for taking time to answer my questions. I am sorry that my knoweldge of R is limited as I have only learned what is necessary to do my work. In the KD tree, we have this recursive data structure in that each knod has two children knods and this process continu

Re: [R] truly object oriented programming in R

2004-08-12 Thread Thomas Lumley
On Thu, 12 Aug 2004, Jason Liao wrote: > Good morning! I recently implemented a KD tree in JAVA for faster > kernel density estimation (part of the code follows). It went well. To > hook it with R, however, has proved more difficult. My question is: is > it possible to implement the algorithm in R

Re: [R] truly object oriented programming in R

2004-08-12 Thread Seth Falcon
For an overview of the OOP R package, see http://cran.r-project.org/doc/Rnews/Rnews_2001-3.pdf + seth __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide

RE: [R] Giving a first good impression of R to Social Scientists

2004-08-12 Thread Liaw, Andy
> From: Barry Rowlingson > > Thomas Lumley wrote: > > On Thu, 12 Aug 2004, Rau, Roland wrote: > > > >>That is why would like to ask the experts on this list if > anyone of you has > >>encountered a similar experience and what you could advise > to persuade > >>people quickly that it is worth le

Re: [R] Approaches to using RUnit

2004-08-12 Thread Seth Falcon
On Tue, Aug 10, 2004 at 04:53:49PM +0200, Klaus Juenemann wrote: > If you don't organize your code into packages but source individual R > files your approach to source the code at the beginning of a test file > looks the right thing to do. Appears to be working pretty well for me too ;-) > We ma

Re: [R] RE: Giving a first good impression of R to Social Scientists

2004-08-12 Thread Gabor Grothendieck
Rau, Roland demogr.mpg.de> writes: > Yes, I do know the R-Commander. But I did not want to give them a > GUI but rather expose them to the command line after I demonstrated that the > steep learning curve in the beginning is worth the effort for the final > results. Note that Rcmdr display

Re: [R] error using daisy() in library(cluster). Bug?

2004-08-12 Thread Martin Maechler
[Reverted back to R-help, after private exchange] > "MM" == Martin Maechler <[EMAIL PROTECTED]> > on Thu, 12 Aug 2004 17:12:01 +0200 writes: > "javier" == javier garcia <- CEBAS <[EMAIL PROTECTED]>> > on Thu, 12 Aug 2004 16:28:27 +0200 writes: javier> Martin; Yes I kn

RE: [R] linear constraint optim with bounds/reparametrization

2004-08-12 Thread Kahra Hannu
>From Spencer Graves: >However, for an equality constraint, I've had good luck by with an objective function >that adds something like the >following to my objective function: constraintViolationPenalty*(A%*%theta-c)^2, where >"constraintViolationPenalty" is >passed via "..." in a call to optim.

Re: [R] truly object oriented programming in R

2004-08-12 Thread Gabor Grothendieck
Jason Liao yahoo.com> writes: : : Good morning! I recently implemented a KD tree in JAVA for faster : kernel density estimation (part of the code follows). It went well. To : hook it with R, however, has proved more difficult. My question is: is : it possible to implement the algorithm in R? My

[R] truly object oriented programming in R

2004-08-12 Thread Jason Liao
Good morning! I recently implemented a KD tree in JAVA for faster kernel density estimation (part of the code follows). It went well. To hook it with R, however, has proved more difficult. My question is: is it possible to implement the algorithm in R? My impression seems to indicate no as the code

Re: [R] Giving a first good impression of R to Social Scientists

2004-08-12 Thread Barry Rowlingson
Thomas Lumley wrote: On Thu, 12 Aug 2004, Rau, Roland wrote: That is why would like to ask the experts on this list if anyone of you has encountered a similar experience and what you could advise to persuade people quickly that it is worth learning a new software? The usual way of teaching R seem

Re: [R] Giving a first good impression of R to Social Scientists

2004-08-12 Thread Thomas Lumley
On Thu, 12 Aug 2004, Rau, Roland wrote: > > That is why would like to ask the experts on this list if anyone of you has > encountered a similar experience and what you could advise to persuade > people quickly that it is worth learning a new software? One problem is that it may not be true. Unles

RE: [R] Help with generating data from a 'not quite' Normal distriburtion

2004-08-12 Thread Kahra Hannu
Consider using the HyperbolicDist package. With the package you can both fit the hyperbolic distribution to your data and generate random numbers from the distribution. Hyperbolic distribution/s provide/s good fit to financial returns that commonly exhibit high peaks and heavy tails. Hannu Kahr

[R] Re: R-help Digest, Vol 18, Issue 12

2004-08-12 Thread John Maindonald
The message for aov1 was "Estimated effects be unbalanced". The effects are not unbalanced. The design is 'orthogonal'. The problem is that there are not enough degrees of freedom to estimate all those error terms. If you change the model to: aov1 <- aov(RT~fact1*fact2*fact3+Error(sub/

Re: [R] error using daisy() in library(cluster). Bug?

2004-08-12 Thread Martin Maechler
¡Hola Javier! since I am the maintainer of the cluster *package* (not "library"), I'm interested to find out more about this problem. I assume, you now use R 1.9.1. Can you give us an example we can reproduce? Give the exact R commands you use and maybe attach the save()d data file (*.rda) in

Re: [R] Help with generating data from a 'not quite' Normal distriburtion

2004-08-12 Thread Prof Brian Ripley
On Thu, 12 Aug 2004, Martin Maechler wrote: > > "Vito" == Vito Ricci <[EMAIL PROTECTED]> > > on Thu, 12 Aug 2004 10:59:23 +0200 (CEST) writes: > > Vito> Hi, Also the Cauchy's distribution could be good: > > Vito> rcauchy(n, location = 0, scale = 1) > > "also" is an exaggerat

Re: RE: [R] Enduring LME confusion… or Psychologists and Mixed-Effects

2004-08-12 Thread Prof Brian Ripley
On Thu, 12 Aug 2004, Doran, Harold wrote: > lme fits models using restricted maximum likelihood by default. So, I > believe this is why you have a different DF. If you include method="ML" > in the modeling function the DF should be similar to aov. It is REML and not ML that generalizes the class

Re: [R] Help with generating data from a 'not quite' Normal distriburtion

2004-08-12 Thread Martin Maechler
> "Vito" == Vito Ricci <[EMAIL PROTECTED]> > on Thu, 12 Aug 2004 10:59:23 +0200 (CEST) writes: Vito> Hi, Also the Cauchy's distribution could be good: Vito> rcauchy(n, location = 0, scale = 1) "also" is an exaggeration, after you already told him to use the t-distribution fam

RE: [R] Enduring LME confusion… or Psychologists and Mixed-Effects

2004-08-12 Thread Doran, Harold
Dear Gijs: lme fits models using restricted maximum likelihood by default. So, I believe this is why you have a different DF. If you include method="ML" in the modeling function the DF should be similar to aov. I think your lme code is incorrect given my understanding of your problem. You can

[R] error using daisy() in library(cluster). Bug?

2004-08-12 Thread javier garcia - CEBAS
Hi, I'm using the cluster library to examine multivariate data. The data come from a connection to a postgres database, and I did a short R script to do the analisys. With the cluster version included in R1.8.0, daisy worked well for my data, but now, when I call daisy, I obtain the following me

Re: [R] Giving a first good impression of R to Social Scientists

2004-08-12 Thread susana barbosa
Hi, I have encountered big difficulties trying to persuade my undergraduate students, with very "slight" background either in statistics or computing to use R instead of SPSS. I tried to start with a sort of very, very simple sample session, just for showing that R is not as complicated as they

[R] RE: Giving a first good impression of R to Social Scientists

2004-08-12 Thread Rau, Roland
Hi, > -Original Message- > From: Vito Ricci [SMTP:[EMAIL PROTECTED] > do you know there are several GUI for R? See: [...] > R-Commander is quite like GUI of commercial softwares. > > Yes, I do know the R-Commander. But I did not want to give them a GUI but rather expose t

[R] Giving a first good impression of R to Social Scientists

2004-08-12 Thread Vito Ricci
Hi, do you know there are several GUI for R? See: http://www.sciviews.org/_rgui/ and in particular: http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/ R-Commander is quite like GUI of commercial softwares. Give a look: they can help your pupils which are able to use SPSS. Although I prefer command li

[R] Giving a first good impression of R to Social Scientists

2004-08-12 Thread Rau, Roland
Dear all, in the coming Winter Semester, I will be a teaching assistant for a course in Survival Analysis. My job will be to do the lab sessions. The software used for these lab sessions will be R. Most of the students have a background in social sciences and the only stats package they used so fa

[R] Help with generating data from a 'not quite' Normal distriburtion

2004-08-12 Thread Vito Ricci
Hi, Also the Cauchy's distribution could be good: rcauchy(n, location = 0, scale = 1) Best Vito I would be very grateful for any help from members of this list for what might be a simple problem... We are trying to simulate the behaviour of a clinical measurement in a series of computer expe

[R] Help with generating data from a 'not quite' Normal distriburtion

2004-08-12 Thread Vito Ricci
Hi, the Student's t distribution could be considered: it's symmetrical, but with a low number of degree of freedom is different from Normal distribution I think in the way you said:"has a much higher peak at the mean and the distribution has much longer tails. " Try to use: rt(n, df) where n=nu

Re: [R] Help with generating data from a 'not quite' Normal distriburtion

2004-08-12 Thread Dimitris Rizopoulos
Hi David, you could try a Student's t distribution with appropriate degrees of freedom and extra scale paremter, i.e., ?rt rgt <- function(n, mu=0, sigma=1, df=stop("no df arg")) mu+sigma*rt(n, df=df) I hope this helps. Best, Dimitris Dimitris Rizopoulos Doctoral Student Biostatistical Ce

[R] Help with generating data from a 'not quite' Normal distriburtion

2004-08-12 Thread Crabb, David
I would be very grateful for any help from members of this list for what might be a simple problem... We are trying to simulate the behaviour of a clinical measurement in a series of computer experiments. This is simple enough to do in R if we assume the measurements to be Gaussian, but their empi

Fwd: [R] Enduring LME confusion… or Psychologists and Mixed-Effects

2004-08-12 Thread Gijs Plomp
I will follow the suggestion of John Maindonald and present the problem by example with some data. I also follow the advice to use mean scores, somewhat reluctantly though. I know it is common practice in psychology, but wouldn’t it be more elegant if one could use all the data points in an ana