Sequential knockoffs for continuous and categorical variables
knockoffs_seq.Rd
Sequential knockoffs for continuous and categorical variables
Arguments
- X
data.frame (or tibble) with "numeric" and "factor" columns only. The number of columns, ncol(X) needs to be > 2.
- seq_simulator
function that simulates sequential knockoffs. Default is the function
sim_glmnet
, which simulates response from an estimated elastic-net model- ...
other parameters passed to the function seq_simulator. For the default (elastic-net sequential seq_simulator,
seq_simulator = sim_glmnet
) these other parameters are passed to cv.glmnet.
Examples
library(knockofftools)
set.seed(1)
X <- generate_X(n=100, p=6, p_b=2, cov_type="cov_equi", rho=0.5)
# knockoffs based on sequential elastic-net regression:
Xk <- knockoffs_seq(X)