Re: [R] sbrier (Brier score) and coxph

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu 30 Jun 2005 - 07:20:10 EST

Is this sbrier from package ipred?

The short answer is that it contains

     ptype <- class(pred)

and assumes that is of length one. For a survfit.coxph fit it is of class c("survfit.cox", "survfit"). I suspect from the help page that this is not supported, but you need to contact the authors (as the posting guide suggests).

On Wed, 29 Jun 2005, Stephen Henderson wrote:

> Hello
> I've decided to try and distill an earlier rather ill focused question to
> try and elicit a response. Any help is greatly appreciated. Why does mod.cox
> not work with sbrier whilst mod.km does? Can I make it work?
>
>
>
>> data(DLBCL)
>> DLBCL.surv<-Surv(DLBCL$time,DLBCL$cens)
>>
>> mod.km<-survfit(DLBCL.surv)
>> mod.cox<-survfit(coxph(DLBCL.surv~IPI, data=DLBCL))
>>
>>
>> sbrier(DLBCL.surv, mod.km)
> integrated Brier score
> 0.2076454
> attr(,"time")
> [1] 1.3 129.9
>> sbrier(DLBCL.surv, mod.cox)
> Error in switch(ptype, survfit = { : switch: EXPR must return a length 1
> vector
>
> Thanks in advance
> Stephen Henderson
>
>
>
> **********************************************************************
> This email and any files transmitted with it are confidentia...{{dropped}}
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Jun 30 07:25:28 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:07 EST