Description Usage Arguments Value References See Also Examples

Computing the stabilized IPCweights

1 |

`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. The default is |

`type` |
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. "An R Package for IPCW: Application to switches in clinical trials" *(submitted)*

1 2 3 4 5 6 7 | ```
## Not run
# ipcw(toy.rep, id = "id", tstart = tstart, tstop = tstop, cens = cens,
# arm="arm",
# bas.cov = c("age"),
# conf = c("TDconf"), trunc = 0.05, type='kaplan-meier')
# see ?SHIdat for a complete example
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.