Description Usage Arguments Details Value Examples
Sequential knockoffs for continuous and categorical variables
1 | knockoffs_seq(X, seq_simulator = sim_EN, ...)
|
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 |
... |
other parameters passed to the function seq_simulator. For the default (elastic-net sequential seq_simulator, |
knockoffs_seq
performs sequential knockoff simulation using elastic-net regression.
sequential knockoff copy of X. A data.frame or tibble of same type and dimensions as X.
1 2 3 4 5 6 7 8 | library(seqknockoff)
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 with penalty alpha:
Xk <- knockoffs_seq(X, alpha=0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.