Learn R Programming

KOBT (version 0.1.0)

generate.knockoff: Generate Knockoff Matrix

Description

Generate different types of knockoff matrices given an original one.

Usage

generate.knockoff(X, type, num, num.comp = 10)

Arguments

X

An input original design matrix.

type

The knockoff type to be generated. There are three choices available: (1) "shrink" for the shrink Gaussian knockoff; (2) "sparse" for the sparse Gaussian knockoff; and (3) "pc" for the pricial component knockoff.

num

The number of knockoff matrices to be created.

num.comp

The number of pricial components to be used for generating knockoff matrices, the default is 10.

Value

A list of created knockoff matrices.

References

barber2015controllingKOBT candes2018panningKOBT bien2011sparseKOBT

Examples

Run this code
# NOT RUN {
set.seed(10)
X <- matrix(rnorm(100), nrow = 10)
Z <- generate.knockoff(X = X, type = "shrink", num = 5)

# }

Run the code above in your browser using DataLab