Learn R Programming

salbm (version 1.0)

PrepMissingPattern: Sensitivity Analysis for Binary Missing Data

Description

Given a dataframe Y in which columns represent timepoints and rows represent subjects creates missing data summaries for display using missingPattern.

Usage

PrepMissingPattern(Y)

Arguments

Y

Is an N0 by NT dataframe with each column representing timepoints and rows representing subjects. Individual values Y_ij = 0, when the event of interest has not occured for subject i at time j, Y_ij = 1, when the event of interest has occured for subject i at time j, Y_ij = 2 or NA when the measurement of the event of interest for subject i at time j is missing.

Value

Returns a list with items

Mat

a matrix of frequencies and percentages

tots

a matrix of subtotals

K

the number of timepoints (columns) in the original data

Details

PrepMissingPattern is used in conjunction with missingPattern to produce a simple summary of missing data in a salmb dataframe.

Examples

Run this code
# NOT RUN {
  data(trt1)
  prep1 <- PrepMissingPattern(trt1)
# }

Run the code above in your browser using DataLab