report_missing function

Report variables with missing data

Report variables with missing data

Report the number of missing observations for each variables of interest relevant for the analysis

report_missing(data, yvar, avar, mvar, cvar, eventvar)

Arguments

  • data: Data frame containing the following relevant variables.
  • yvar: A character vector of length 1. Outcome variable name. It should be the time variable for the survival outcome.
  • avar: A character vector of length 1. Treatment variable name.
  • mvar: A character vector of length 1. Mediator variable name.
  • cvar: A character vector of length > 0. Covariate names. Use NULL if there is no covariate. However, this is a highly suspicious situation. Even if avar is randomized, mvar is not. Thus, there are usually some confounder(s) to account for the common cause structure (confounding) between mvar and yvar.
  • eventvar: An character vector of length 1. Only required for survival outcome regression models. Note that the coding is 1 for event and 0 for censoring, following the R survival package convention.

Returns

No return value, called for side effects.