sample_toy_data: Samples toy two block JIVE data.

Description Usage Arguments Details Value Examples

View source: R/toy_data.R

Description

sample_toy_data samples the two block distribution from AJIVE figure 2.

Usage

1
2
sample_toy_data(n = 200, dx = 100, dy = 500, sigma = 0.5,
  only_observations = TRUE)

Arguments

n

Integer. Number of observations. Must be divisible by 20.

dx

Integer. Dimension of X block. Must be divisible by 2.

dy

Integer. Dimension of Y block. Must be divisible by 10.

sigma

Float. Noise strength.

only_observations

Boolean. Whether or not to include the true decomposition.

Details

Note AJIVE figure 2 uses n=100, dx=100 and dy=10000 and sigma=1.

Value

A list of length 2 with the sampled data. Each list contains: obs, joint, individual, and noise.

Examples

1
2
blocks <- sample_toy_data()
X1 = blocks[[1]]

idc9/r_jive documentation built on Oct. 20, 2020, 4:23 p.m.