TCA (version 1.0.0)

test_data: 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")

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.

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 factors in C1 on each of the m features in X, where the first p1 columns are the source-specific effects of the p1 factors 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 factors in C2 on the mixture values of each of the m features in X.

Details

See tca for details about the TCA model.

Examples

Run this code
# NOT RUN {
data <- test_data(100, 50, 3, 2, 2, 0.01)

# }

Run the code above in your browser using DataLab