This function generates Gaussian knockoff variables using the second-order method with the semi-definite programming (SDP) approach. It is particularly useful for variable selection tasks involving shrinkage methods.

create.shrink_Gaussian(X, n_ko = 1, verbose = FALSE)

Arguments

X

A numeric matrix or data frame of predictors for which knockoffs will be generated. Each column represents a variable, and each row corresponds to an observation.

n_ko

An integer specifying the number of knockoff matrices to generate. Default is 1.

verbose

Logical. If TRUE, displays progress information during knockoff generation. Default is TRUE.

Value

A list of matrices containing Gaussian knockoff variables corresponding to the original matrix X. Each matrix in the list has the same dimensions as X.

Details

This function uses the semi-definite programming (SDP) method to generate second-order Gaussian knockoffs. It is useful in statistical settings, such as controlling the false discovery rate in variable selection tasks that involve shrinkage methods.

Examples

# Generate a random matrix of predictors
X <- matrix(rnorm(100), nrow = 10, ncol = 10)

# Create shrink Gaussian knockoffs
Xk <- create.shrink_Gaussian(X)