create.seq.Rd
This function generates sequential knockoff copies of the input data frame X
. Sequential knockoffs simulate new variables for each column of X
using the seq_simulator
, which by default is glmnet.recovery
. This default method fits elastic-net models to sequentially generate knockoffs.
create.seq(X, n_ko = 1, seq_simulator = glmnet.recovery, verbose = FALSE, ...)
A data frame or tibble with numeric and factor columns only. The number of columns, ncol(X)
, must be greater than 2.
Integer. The number of knockoff matrices to generate. Default is 1.
Function that simulates sequential knockoffs. Default is glmnet.recovery
, which simulates responses from an estimated elastic-net model.
Logical. Whether to display progress information during the knockoff generation. Default is FALSE.
Additional parameters passed to seq_simulator
. For the default elastic-net method, these are passed to cv.glmnet
.
A list of data frames or tibbles, each containing the sequential knockoff copies of X
, with the same type and dimensions as the original X
.
create.seq
performs sequential knockoff simulations using elastic-net regression as the default method. It loops over the columns of X
and generates knockoffs for each column, using the other columns as predictors.
Other create:
create.fixed()
,
create.gaussian()
,
create.pc()
,
create.pls()
,
create.second_order()
,
create.shrink_Gaussian()
,
create.sparse_Gaussian()
,
create.sparse_seq()
,
create.zpls()
set.seed(1)
X <- generate_X(n = 100, p = 6, p_b = 2, cov_type = "cov_equi", rho = 0.5)
Xk <- create.seq(X)