Milan Bouchet-Valat <nalimi...@club.fr>
On Tue, 2011-12-20 at 12:00 +0100, r-help-requ...@r-project.org wrote:
> > Dear all,
> > 
> > is there a function similar to extractAIC based on which I can
> extract the
> > BIC (Bayesian Information Criterion) of a coxph model?
> > I found some functions that provide BIC in other packages, but none
> of them
> > seems to work with coxph.
> Use extractAIC(), but set the 'k' argument to log(n), with n the
> number
> of observations in the models (this is explained briefly
> in ?extractAIC).
> 
> 
For survival models the "effective n" is the number of events rather
than the number of observations.  I believe most define BIC in this way.
For a cox model:
  > fit <- coxph(Surv(time, status) ~ wt.loss, data=lung)
  > fit$nevent
     152

Terry Therneau

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to