[R] sbrier (Brier score) and coxph

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jun 29 23:20:10 CEST 2005


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 at 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 at 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




More information about the R-help mailing list