PartitionData: Partition Data by Outcome Missingness Pattern.

View source: R/Partition-Data.R

PartitionDataR Documentation

Partition Data by Outcome Missingness Pattern.

Description

Partition Data by Outcome Missingness Pattern.

Usage

PartitionData(t, s, X, Z = NULL)

Arguments

t

Target outcome vector.

s

Surrogate outcome vector.

X

Target model matrix.

Z

Surrogate model matrix.

Value

List containing these components:

  • 'Orig' original data.

  • 'Dims' dimensions and names.

  • 'Complete', data for complete cases.

  • 'TMiss', data for subjects with target missingness.

  • 'SMiss', data for subjects with surrogate missingness.

  • 'IPs', inner products.

Examples

# Generate data.
n <- 1e3
X <- rnorm(n)
Z <- rnorm(n)
data <- rBNR(X = X, Z = Z, b = 1, a = -1)
data_part <- PartitionData(
  t = data[, 1], 
  s = data[, 2], 
  X = X, 
  Z = Z
)

zrmacc/BNEM documentation built on March 31, 2024, 12:20 a.m.