createXblocks: Create list of paired data blocks

View source: R/MultiLambdaCVfun.R

createXblocksR Documentation

Create list of paired data blocks

Description

Create list of paired data blocks

Usage

createXblocks(datablocks, which2pair = NULL)

Arguments

datablocks

List of data frames or matrices representing b=1,...,B data blocks of dimensions n x p_b.

which2pair

Integer vector of size 2 (or NULL)

Details

Only use this function when you wish to pair two data blocks. If which2pair = NULL the output matches the input. If not, the function adds a paired data block, pairing the two data blocks corresponding to the elements of which2pair.

Value

List. Same length as datablocks when which2pair = NULL, or augmented with one paired data block.

See Also

createXXblocks. A full demo and data are available from:
https://drive.google.com/open?id=1NUfeOtN8-KZ8A2HZzveG506nBwgW64e4

Examples

n <- 43
p <- 100
fakeXbl <- createXblocks(list(X1 = matrix(rnorm(n*p),nrow=n),X2 = matrix(rnorm(n*p),nrow=n)))

multiridge documentation built on June 13, 2022, 5:07 p.m.