Description Usage Arguments Value References See Also Examples
Computing the stabilized IPCweights
1 2 3 4 5 6 7 8 9 10 11 12 |
data |
a dataframe containing the following variables |
id |
the patient's id |
tstart |
the date of the beginning of the follow-up (in numeric format, with the first being equal at 0) |
tstop |
the date of the end of the follow-up (in numeric format) |
cens |
the indicator of treatment censoring (denoted by 1 at the end of the follow-up) |
arm |
the randomized treatment (2-levels factor) |
bas.cov |
a vector the baseline covariates |
conf |
a vector of time-dependent confounders |
trunc |
an optional fraction for the weights. For instance, when trunc = 0.01, the left tail is truncated to the 1st percentile and the right tail is truncated to the 99th percentile |
type |
a character string specifying the type of survival curve. The default is |
the initial dataframe data with stabilized IPCweights as additional arguments. By default, the un-truncated stabilized weights are given. If the trunc option is not NULL then the truncated stabilized weights are also given.
Graffeo, N., Latouche, A., Le Tourneau C., Chevret, S. (2019) "ipcwswitch: an R package for inverse probability of censoring weighting with an application to switches in clinical trials". Computers in biology and medicine, 111, 103339. doi : "10.1016/j.compbiomed.2019.103339"
1 2 3 4 5 6 7 | ## Not run
# ipcw(toy.rep, tstart = tstart, tstop = tstop, cens = cens,
# arm="arm",
# bas.cov = c("age"),
# conf = c("TDconf"), trunc = 0.05)
# see ?SHIdat for a complete example
|
Loading required package: survival
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.