Generate different types of knockoff matrices given an original one.

create.knockoff(X, type, n_ko, ncomp = 10, verbose = FALSE, ...)

Arguments

X

A numeric matrix representing the original design matrix.

type

The knockoff type to be generated. Available options for type are:

  1. "shrink" for the shrink Gaussian knockoff;

  2. "sparse" for the sparse Gaussian knockoff;

  3. "pc" for the principal component (PC) knockoff;

  4. "pls" for the partial least squares (PLS) knockoff;

  5. "zpls" for the GZ's sparse partial least squares knockoff.

n_ko

A positive integer indicating the number of knockoff matrices to be created.

ncomp

The number of principal components to be used for generating knockoff matrices. Default is 10.

verbose

Logical; if TRUE, messages about the progress are printed. Default is FALSE.

...

Additional arguments to be passed to specific knockoff creation functions.

Value

A list of created knockoff matrices. Each element of the list corresponds to a generated knockoff matrix.

Examples

set.seed(10)
X <- matrix(rnorm(100), nrow = 10)
Xk <- create.knockoff(X = X, type = "shrink", n_ko = 5)