generateModel2: Generate data from SLIDE model for three views.

Description Usage Arguments Details Value Examples

View source: R/Models.R

Description

Generates three matched datasets from SLIDE model with rank 2 for each type of structure (shared, partially-shared and individual).

Usage

1
generateModel2(n = 100, pvec = c(100, 100, 100), snr = 1, orthogonalV = T)

Arguments

n

An integer specifying the number of matched samples, the default value is 100.

pvec

A vector of integer values p_1, p_2, p_3 corresponding to the number of measurements within each data view. The default value is pvec = c(100,100,100).

snr

A non-negative value specifying the ratio between the Frobenius norm of the signal matrix and the Frobenius norm of the noise matrix. This value determines the variance of the elements in the noise matrix. The default value is 1.

orthogonalV

A logical indicating whether the loading vectors should be generated orthogonal to each other, the default value is TRUE.

Details

Generates X_1 (n x p_1), X_2 (n x p_2) and X_3 (n x p_3) according to the additive noise model

X_1 = Z_1 + E_1, X_2 = Z_2 + E_2, X_3 = Z_3 + E_3,

where noise matrices E_1, E_2, E_3 have independent entries from normal distribution with mean zero, and standard deviations according to sigmavec, and signal matrix Z=[Z_1, Z_2, Z_3] is generated using SLIDE decomposition

Z = UV',

where U (n x 14) is generated using uniform distribution on [0,1] with subsequent centering and standardization, and V (p x 14) is generated as a block-sparse matrix with orthogonal columns so that the rank of each structure (shared, partially-shared, individual) is two.

Value

A list with the elements

X

A n x (p_1 + p_2 + p_3) concatenated data matrix of views X_1, X_2, X_3.

pvec

The supplied values of pvec.

sigmavec

A vector of values s_1, s_2, s_3 corresponding to standard deviations of the elements of noise matrix for each data view.

U

The score matrix from the SLIDE model.

V

The loadings matrix from the SLIDE model.

snr

The supplied value of snr.

Examples

1
2
data <- generateModel2(n = 100, pvec = c(100,100,100), snr = 1)
data <- generateModel2(n = 50, pvec = c(25,100,40), snr = 2)

irinagain/SLIDE documentation built on Aug. 14, 2021, 2:56 p.m.