PartitionData {SurrogateRegression} | R 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
)
[Package SurrogateRegression version 0.6.0.1 Index]