title: Estimating prediction accuracy of a Cox survival model using sbrier (R)
body: <p>The integrated Brier score (IBS) has been suggested in a paper by Graf et al (1999) as a good measure for prediction accuracy in survival models (see e.g. <a href="http://www.slcmsr.net/boulesteix/papers/survival.pdf" rel="nofollow noreferrer">overview paper by Wiering et al.</a>, page 23). </p>
  
  <p>It was implemented in the package <code>ipred</code> as function <code>sbrier</code>. However, whereas the brier score definition obviously applies to Cox proportional hazard models, I cannot get <code>sbrier</code> to return the Brier score for a <code>coxph</code> model.</p>
  
  <p>Here is the problem set up.</p>
  
  <pre><code>library(survival)
  library(ipred)
  data("DLBCL", package = "ipred")
  
  #Fit coxph model    
  smod   &lt;- Surv(DLBCL$time, DLBCL$cens)
  coxmod &lt;- coxph(smod ~ IPI, data = DLBCL) # I just chose a significant covariate from DLBCL
  </code></pre>
  
  <p>Now I want to estimate the IBS. Following <code>?sbrier</code> </p>
  
  <pre><code>obj  : an object of class Surv.
  pred : predicted values. Either a probability or a list of survfit objects.
  </code></pre>
  
  <p>So we have a list of survfit objects</p>
  
  <pre><code>sbrier(smod, list(survfit(coxmod) ))
  </code></pre>
  
  <p>or survival probabilties</p>
  
  <pre><code>sbrier(smod, survfit(coxmod,newdata=DLBCL)$surv )
  </code></pre>
  
  <p>The first returning</p>
  
  <pre><code>Error in sbrier(smod, list(survfit(coxmod))) : 
    pred must be of length(time)
  </code></pre>
  
  <p>The second</p>
  
  <pre><code>Error in sbrier(smod, survfit(coxmod, newdata = DLBCL)$surv) : 
    wrong dimensions of pred
  </code></pre>
  
  <p>The examples do not list a <code>coxph</code> model. Perhaps it's not supported. Otherwise, where do I go wrong?</p>