data.generation {mvnimpute} | R Documentation |
Data generation function
Description
Simulates multivariate normal data with missing and censored values. In this function, missing values will be generated first in the multivariate data, then censored values will be generated for the non-missing data.
Usage
data.generation(
num_ind = 2000,
mean_vec = rnorm(5),
cov_mat = diag(5),
miss_var = c(2, 3),
miss_mech = "MCAR",
miss_prob = c(0.2, 0.4),
censor_var = 4,
censor_type = "interval",
censor_param = 0.1
)
Arguments
num_ind |
number of subjects. |
mean_vec |
mean vectors. |
cov_mat |
covariance matrix. |
miss_var |
variables that have missing values. |
miss_mech |
missing mechanism. "MCAR" or "MAR". Default "MCAR". |
miss_prob |
missing data probability when missing data is MCAR. |
censor_var |
variables that have censored values. |
censor_type |
type of censoring. "interval", "right" or "left. Default "interval". |
censor_param |
rate parameter of the exponential distribution that the censoring times come from. |
Value
A list containing the fully observed data, the observed data, the bounds information of the observed data and the data type indicator matrix.
Examples
### generate a multivariate normal dataset of 2000 sample size
### using the default arguments
data.generation()
[Package mvnimpute version 1.0.1 Index]