Learn R Programming

idem (version 5.2)

imImpAll_mice: Impute missing data by mice

Description

Conduct imputation using the NARFCS model implemented in the mice package

Usage

imImpAll_mice(
  im.data,
  deltas = 0,
  n.imp = 5,
  endponly = TRUE,
  seed = NULL,
  ...
)

Value

A class IDEMIMP list with components

lst.var

List of parameters

complete

A dataset with the original data for the subset of subjects who died at the end of the study or had no missing outcomes and the n.imp imputed missing outcomes for subjects who need missing value imputation.

n.imp

Number of imputed complete datasets

deltas

Imputation sensitivity parameters

org.data

Original dataset

Arguments

im.data

A class IDEMDATA object generated by imData

deltas

Vector of imputation sensitivity parameters

n.imp

Number of complete datasets required

endponly

Logical variable that indicates whether clinical outcomes not used in calculating the functional outcome are considered as missing and should be imputed. The default is FALSE, indicating that all missing clinical outcomes will be imputed sequentially

seed

Random seed

...

Parameters for mice

Examples

Run this code

if (FALSE) {
rst.abc <- imData(abc, trt="TRT", surv="SURV", outcome=c("Y1","Y2"),
                 y0=NULL, endfml="Y2",
                 trt.label = c("UC+SBT", "SAT+SBT"),
                 cov=c("AGE"), duration=365, bounds=c(0,100));
rst.imp <- imImpAll_mice(rst.abc, deltas=c(-0.25,0,0.25));}

Run the code above in your browser using DataLab