Message-ID: <CADGDKJgijHEYURj4L8EY_iYS68qVwXr2j-NYCyrZR60mDh7ZRw@mail.gmail.com>
Date: 2012-02-21T00:50:40Z
From: Ehsan Karim
Subject: bootstrap in time dependent Cox model
Dear R-list,
I am wondering how to perform a bootstrap in R for the weighted time
dependent Cox model? (Andersen?Gill format, with multiple observations
from each patients) to obtain the bootstrap standard error of the
treatment effect.
Below is an example dataset. Would 'censboot' be appropriate to use in
this context? Any suggestions/references/direction to R-package will
be highly appreciated.
Thanks
Ehsan
###########################
> dataset = read.csv("http://stat.ubc.ca/~e.karim/dataset2.csv")
> head(dataset) # (tx = treatment, weight = IPTW)
id tx enter exit event weight
1 1 0 0 1 0 1.037136
2 1 0 1 2 0 1.299079
3 1 0 2 3 0 1.352642
4 1 1 3 4 0 1.245575
5 1 0 4 5 0 1.360458
6 1 0 5 6 0 1.236780
> time.dep.weighted.cox = coxph(Surv(enter, exit, event) ~ tx + cluster(id), robust = TRUE, data = dataset, weights = weight)
> time.dep.weighted.cox
coef exp(coef) se(coef) robust se z p
tx -0.2 0.819 0.22 0.25 -0.798 0.42
Likelihood ratio test=0.83 on 1 df, p=0.361 n= 9626, number of events= 81