[R] partial likelihood device

2012-04-02 Thread Dunia Scheid
Hello, I would like to get the partial likelihood device. fit <- coxph(Surv(stop,event)~rx+size+number,data=bladder) Does fit$loglik give the partial likelihood device? Many thanks, Dunia [[alternative HTML version deleted]] __ R-help@r-proj

Re: [R] p-value from GLM

2012-03-05 Thread Dunia Scheid
Dear Peter, Many thanks for the reply. Sure, this is just an example and it makes zero sense! Regards, Dunia 2012/3/4 peter dalgaard > > On Mar 4, 2012, at 12:21 , Dunia Scheid wrote: > > > Dear all, > > > > I am fitting a GLM similar to > > > > library

[R] p-value from GLM

2012-03-04 Thread Dunia Scheid
Dear all, I am fitting a GLM similar to library(MASS) anorex.1 <- glm(Treat~Postwt+Prewt,family = binomial, data = anorexia) I have found two ways of computing the p-value of the fitted model: pval1 <- 1-pchisq(anorex.1$deviance,anorex.1$df.residual) pval2 <- 1-pchisq(anorex.1$null.deviance - an

[R] Principal Components Analysis

2011-08-16 Thread Dunia Scheid
Hello, I am using the function princomp and I would like to get the coefficients of the PCA's! Would this be the rotation in the output or how can one get the coefficients of the PCA's? Many thanks, Dunia [[alternative HTML version deleted]] _

Re: [R] median survival time from survfit

2011-03-18 Thread Dunia Scheid
Many thanks! 2011/3/18 Marc Schwartz > On Mar 18, 2011, at 6:06 AM, Dunia Scheid wrote: > > > Hello, > > > > I am trying to compute the mdeian of the survival time from the function > > survfit: > > > >> fit <- survfit(Surv(time, status) ~ 1

[R] median survival time from survfit

2011-03-18 Thread Dunia Scheid
Hello, I am trying to compute the mdeian of the survival time from the function survfit: > fit <- survfit(Surv(time, status) ~ 1) > fit Call: survfit(formula = Surv(time, status) ~ 1) records n.max n.start events median 0.95LCL 0.95UCL 111 111 111 20 NA NA NA

[R] date

2010-09-02 Thread Dunia Scheid
Hello all, I've 2 strings that representing the start and end values of a date and time. For example, time1 <- c("21/04/2005","23/05/2005","11/04/2005") time2 <- c("15/07/2009", "03/06/2008", "15/10/2005") as.difftime(time1,time2) Time differences in secs [1] NA NA NA attr(,"tzone") [1] "" How ca