recreg | R Documentation |
Fits Ghosh-Lin IPCW Cox-type model
recreg(
formula,
data,
cause = 1,
death.code = c(2),
cens.code = 0,
cens.model = ~1,
weights = NULL,
offset = NULL,
Gc = NULL,
wcomp = NULL,
marks = NULL,
augmentation.type = c("lindyn.augment", "lin.augment"),
...
)
formula |
formula with 'Event' outcome |
data |
data frame |
cause |
of interest (1 default) |
death.code |
codes for death (terminating event, 2 default) |
cens.code |
code of censoring (0 default) |
cens.model |
for stratified Cox model without covariates |
weights |
weights for score equations |
offset |
offsets for model |
Gc |
censoring weights for time argument, default is to calculate these with a Kaplan-Meier estimator, should then give G_c(T_i-) |
wcomp |
weights for composite outcome, so when cause=c(1,3), we might have wcomp=c(1,2). |
marks |
a mark value can be specified, this is vector from the data-frame where the mark value can be found at all events |
augmentation.type |
of augmentation when augmentation model is given |
... |
Additional arguments to lower level funtions |
For Cox type model :
E(dN_1(t)|X) = \mu_0(t)dt exp(X^T \beta)
by solving Cox-type IPCW weighted score equations
\int (Z - E(t)) w(t) dN_1(t)
where
w(t) = G(t) (I(T_i \wedge t < C_i)/G_c(T_i \wedge t))
and
E(t) = S_1(t)/S_0(t)
and
S_j(t) = \sum X_i^j w_i(t) \exp(X_i^T \beta)
.
The iid decomposition of the beta's are on the form
\int (Z - E ) w(t) dM_1 + \int q(s)/p(s) dM_c
and returned as iid.
Events, deaths and censorings are specified via stop start structure and the Event call, that via a status vector and cause (code), censoring-codes (cens.code) and death-codes (death.code) indentifies these. See example and vignette.
Thomas Scheike
## data with no ties
data(hfaction_cpx12)
hf <- hfaction_cpx12
hf$x <- as.numeric(hf$treatment)
ll <- recreg(Event(entry,time,status)~treatment+cluster(id),data=hf,
cause=1,death.code=2)
summary(ll)
## censoring stratified after treatment
lls <- recreg(Event(entry,time,status)~treatment+cluster(id),data=hf,
cause=1,death.code=2,cens.model=~strata(treatment))
summary(lls)
## IPCW at 2 years
ll2 <- recregIPCW(Event(entry,time,status)~treatment+cluster(id),data=hf,
cause=1,death.code=2,time=2,cens.model=~strata(treatment))
summary(ll2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.