View source: R/data.generation.new.R
data.generation | R Documentation |
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.
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 )
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. |
A list containing the fully observed data, the observed data, the bounds information of the observed data and the data type indicator matrix.
### generate a multivariate normal dataset of 2000 sample size ### using the default arguments data.generation()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.