Learn R Programming

tipse (version 1.2)

impute_deterministic: Model-free imputation via deterministic sampling

Description

patients will be assigned deterministically an event time at the time of censoring or extend the censoring time to the potential maximum follow-up of each patient.

Usage

impute_deterministic(dat, reason, impute, npts, J, seed)

Value

a list of data.frame from each imputation with imputed AVAL and EVENT, where original variables are kept as AVAL and EVENT.

Arguments

dat

data.frame containing at least 5 columns: TRT01P (treatment arm as factor), AVAL (survival time), EVENT (event indicator), CNSRRS (censoring reason) and MAXAVAL (maximum potential survival time, duration between randomization to data cut-off)

reason

a string specifying the censoring reasons which require imputation. It must be one of the reasons from variable CNSRRS.

impute

a string specifying the treatment arm(s) which require imputation. It must be one of the arms from variable TRT01P, the first level of TRT01P is considered as the control arm.

npts

number of patients to be imputed

J

numeric indicating number of imputations.

seed

Integer. Random seed for reproducibility.

Details

patients will be assigned deterministically an event time at the time of censoring or extend the censoring time to the potential maximum follow-up of each patient.