PartitionData function

Partition Data by Outcome Missingness Pattern.

Partition Data by Outcome Missingness Pattern.

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

Arguments

  • t: Target outcome vector.
  • s: Surrogate outcome vector.
  • X: Target model matrix.
  • Z: Surrogate model matrix.

Returns

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 )
  • Maintainer: Zachary McCaw
  • License: GPL-3
  • Last published: 2023-10-01

Useful links