View source: R/make_example_data.R
make_example_data | R Documentation |
Function to simulate an example multi-view multi-group data set according to the generative model of MOFA2.
make_example_data(
n_views = 3,
n_features = 100,
n_samples = 50,
n_groups = 1,
n_factors = 5,
likelihood = "gaussian",
lscales = 1,
sample_cov = NULL,
as.data.frame = FALSE
)
n_views |
number of views |
n_features |
number of features in each view |
n_samples |
number of samples in each group |
n_groups |
number of groups |
n_factors |
number of factors |
likelihood |
likelihood for each view, one of "gaussian" (default), "bernoulli", "poisson", or a character vector of length n_views |
lscales |
vector of lengthscales, needs to be of length n_factors (default is 0 - no smooth factors) |
sample_cov |
(only for use with MEFISTO) matrix of sample covariates for one group with covariates in rows and samples in columns or "equidistant" for sequential ordering, default is NULL (no smooth factors) |
as.data.frame |
return data and covariates as long dataframe |
Returns a list containing the simulated data and simulation parameters.
# Generate a simulated data set
MOFAexample <- make_example_data()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.