test_data {TCA} | R Documentation |
Generate test data
Description
Generates simple test data following the TCA model.
Usage
test_data(n, m, k, p1, p2, tau, log_file = "TCA.log", verbose = TRUE)
Arguments
n |
The number of observations to simulate.
|
m |
The number of features to simulate.
|
k |
The number of sources to simulate.
|
p1 |
The number of covariates that affect the source-specific values to simulate.
|
p2 |
The number of covariates that affect the mixture values to simulate.
|
tau |
The variance of the i.i.d. component of variation to add on top of the simulated mixture values.
|
log_file |
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 .
|
verbose |
A logical value indicating whether to print logs.
|
Details
See tca for details about the TCA model.
Value
A list with the simulated data and parameters.
X |
An m by n matrix of simulated data with m features for n observations.
|
Z |
A list with the simulated source-specific values, where the first element in the list is an m by n matrix (features by observations) corresponding to the values coming from the first source, the second element in the list is another m by n matrix (features by observations) corresponding to the values coming from the second source and so on.
|
W |
An n by k matrix of simulated weights - the weights of the k sources for each of the n mixtures (observations).
|
mus |
An m by k matrix of the mean of each of the m features for each of the k sources.
|
sigmas |
An m by k matrix of the standard variation of each of the m features for each of the k sources.
|
C1 |
An n by p1 design matrix of simulated covariates that affect the hidden source-specific values.
|
C2 |
An n by p2 design matrix of simulated covariates that affect the mixture.
|
gammas |
An m by k*p1 matrix of the effects 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.
|
deltas |
An m by p2 matrix of the effects of the p2 covariates in C2 on the mixture values of each of the m features in X .
|
Examples
data <- test_data(100, 50, 3, 2, 2, 0.01)
[Package
TCA version 1.2.1
Index]