Simulate all model parameters and sample source specific data from multivariate gaussian with full covariance structure.
simulate_data(
n,
m,
k,
p1,
p2,
mus_mean = 10,
mus_std = 2,
gammas_mean = 1,
gammas_std = 0.1,
betas_mean = 1,
betas_std = 0.1,
sigmas_lb = 0,
sigmas_ub = 1,
taus_std = 0.1,
log_file = "Unico.log",
verbose = FALSE
)
A positive integer indicating the number of observations to simulate.
A positive integer indicating the number of features to simulate.
A positive integer indicating the number of sources to simulate.
A non-negative integer indicating the number of source-specific covariates to simulate.
A non-negative indicating the number of non-source-specific covariates to simulate.
A numerical value indicating the average of the source specific means.
A positive value indicating the variation of the source specific means across difference sources.
A numerical value indicating the average effect sizes of the source-specific covariates.
A non-negative numerical value indicating the variation of the effect sizes of the source-specific covariates.
A numerical value indicating the average effect sizes of the non-source-specific covariates.
A non-negative numerical value indicating the variation of the effect sizes of the non-source-specific covariates.
A numerical value indicating the lower bound of a uniform distribution from which we sample entries of matrix A
used to construct the feature specific k
by k
variance-covariance matrix.
A numerical value indicating the upper bound of a uniform distribution from which we sample entries of matrix A
used to construct the feature specific k
by k
variance-covariance matrix.
non-negative numerical value indicating the variation of the measurement noise across difference features.
A path to an output log file. Note that if the file log_file
already exists then logs will be appended to the end of the file. Set log_file
to NULL
to prevent output from being saved into a file; note that if verbose == FALSE
then no output file will be generated regardless of the value of log_file
.
A logical value indicating whether to print logs.
A list of simulated model parameters, covariates, observed mixture, and source-specific data.
An m
by n
matrix of the simulated mixture for m
features and n
observations.
An n
by k
matrix of the weights/proportions of k
source for each of the n
observations.
An n
by p1
matrix of the simulated covariates that affect the source-specific values.
An n
by p2
matrix of the simulated covariates that affect the mixture values.
A k
by m
by n
tensor of the source specific values for each of the k
sources
An m
by k
matrix of the mean of each of the m
features for each of the k
sources.
An m
by k*p1
matrix of the effect sizes of the p1
covariates in C1
on each of the m
features in X
, where the first p1
columns are the source-specific effects of the p1
covariates on the first source, the following p1
columns are the source-specific effects on the second source and so on.
An m
by p2
matrix of the effect sizes of the p2
covariates in C2
on the mixture values of each of the m
features.
An m
by k
by k
tensor of the variance-covariance matrix of each of the m
features.
An m
by 1
matrix of the feature specific variance of the measurement noise for all m features.
Simulate data based on the generative model described in function Unico.
data = simulate_data(n=100, m=2, k=3, p1=1, p2=1, taus_std=0, log_file=NULL)