toydata {ipcwswitch}R Documentation

A short example dataset

Description

Dataset toydata contains repeated measurements made in 3 patients. It mimics randomized clinical trials data with two parallel arms with a repeated measurement of a time-varying binary covariate, which could be the time-varying confounder acting both on the survival and treatment censoring.

Usage

data("toydata")

Format

A data frame with 3 observations on the following 12 variables.

id

a numeric vector corresponding to the patient's identifier

randt

a vector containing the date of the randomization visit

lastdt

a vector containing the date of latest news

status

a numeric vector. The value equals to 1 if the patient dies at lastdt (and 0 otherwise)

age

a numeric vector containing patient’s age (in years) at randomization

ps1

a numeric vector containing the values (0 or 1) of a repeated measurement happening on date randt. Note that some of them could be missing

ps2

a numeric vector containing the values (0 or 1) of a repeated measurement happening on date dt2. Note that some of them could be missing

ps3

a numeric vector containing the values (0 or 1) of a repeated measurement happening on date dt3. Note that some of them could be missing

dt2

a vector containing the dates of measurement of ps2. Note that some of them could be missing

dt3

a vector containing the date of measurement ps3. Note that some of them could be missing

arm

a vector containing the patient’s randomized arm

swtrtdt

a vector containing the date when the patient initiates the other arm treatment (NA if does not happen)

References

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"

Examples

data(toydata)
toydata

[Package ipcwswitch version 1.0.4 Index]