Description Usage Arguments Value
View source: R/generate_data.R
generate_sim_data
produces simulated data that can be used for testing
the mmBPFA sampler prior to production runs to ensure it will behave as expected.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | generate_sim_data(
mode = "fixed",
n_levels = 2,
n = 1000,
p = 500,
K_true = 10,
sparsity = NULL,
a = 10,
b = 1,
d = 2,
e = 1,
prop_missing = 0,
noise = 0.05,
seed = 123
)
|
mode |
Sets the type of margins for the simulated data. Must be one of "fixed", "multi" or "mixed." Default is "fixed." |
n_levels |
Max number of unique values per margin. When mode is "fixed" n_levels is constant across margins. When mode is "multi" a margin may take on unique values up to n_levels. When mode is "mixed", n_levels determines max number of arbitrary distributions data may be drawn from. Default is 2. |
n |
Number of observations. Default is 1000. |
p |
Number of features. Default is 500. |
K_true |
True number of latent dimensions. Default is 10. |
sparsity |
Numeric value between 0 and 1 that determines amount of sparsity in the factor loadings. If sparsity argument is set, zeros are uniformly distributed across all dimensions. Default is NULL. |
a |
A hyperparameter determining the distribution of sparsity across the factor loadings. Default is 10 |
b |
A hyperparameter determining the distribution of sparsity across the factor loadings. Default is 1. |
d |
A hyperparameter determining the shape of the factor precisions (gamma_k). Default is 2. |
e |
A hyperparameter determining the scale of the factor precisions (gamma_k). Default is 1. |
prop_missing |
Numeric value between 0 and 1 determining the proportion of missingness in the data. Default is 0. |
noise |
Numeric value between 0 and 1 determining how much noise should be induced into the data. Default is 0.05. |
seed |
Random seed. Default is 123. |
S3 object of class mmBPFA.simulated.data
containing generated data and true underlying values. Attributes note the user-given arguments.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.