COMBO_data {COMBO} | R Documentation |
Generate Data to use in COMBO Functions
Description
Generate Data to use in COMBO Functions
Usage
COMBO_data(sample_size, x_mu, x_sigma, z_shape, beta, gamma)
Arguments
sample_size |
An integer specifying the sample size of the generated data set. |
x_mu |
A numeric value specifying the mean of |
x_sigma |
A positive numeric value specifying the standard deviation of
|
z_shape |
A positive numeric value specifying the shape parameter of
|
beta |
A column matrix of |
gamma |
A numeric matrix of |
Value
COMBO_data
returns a list of generated data elements:
obs_Y |
A vector of observed outcomes. |
true_Y |
A vector of true outcomes. |
obs_Y_matrix |
A numeric matrix of indicator variables (0, 1) for the observed
outcome |
x |
A vector of generated predictor values in the true outcome mechanism, from the Normal distribution. |
z |
A vector of generated predictor values in the observation mechanism from the Gamma distribution. |
x_design_matrix |
The design matrix for the |
z_design_matrix |
The design matrix for the |
Examples
set.seed(123)
n <- 500
x_mu <- 0
x_sigma <- 1
z_shape <- 1
true_beta <- matrix(c(1, -2), ncol = 1)
true_gamma <- matrix(c(.5, 1, -.5, -1), nrow = 2, byrow = FALSE)
my_data <- COMBO_data(sample_size = n,
x_mu = x_mu, x_sigma = x_sigma,
z_shape = z_shape,
beta = true_beta, gamma = true_gamma)
table(my_data[["obs_Y"]], my_data[["true_Y"]])