Description Usage Arguments Value Examples
This function simulates 'complete' and 'missing' datasets. For each independent dataset, one variable per domain will be set to missing.
1 2 3 4 5 |
loading |
The measurement model for x. The ' |
correlation |
The structure matrix of the latent variables. The ' |
factor_structure |
A named list. The list names are the factor names.
Each element is a character vector of feature names for the corresponding factor.
Should be ordered corresponding to the rows of the ' |
n_rows |
An integer for the number of rows for each independent dataset. |
n_datasets |
An integer for the number of independent datasets. |
seed |
An integer for the seed. |
Returns a list that contains the complete data and missing data.
1 2 3 4 5 6 7 8 | #----------------------------------------------------------------------------
# Data simulation example
#----------------------------------------------------------------------------
# By default, sim() will simulate 3 variables from 3 different domains.
d_sim <- sim()
str(d_sim)
complete_data <- d_sim$complete
missing_data <- d_sim$missing
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.