knockoffs_seq: Sequential knockoffs for continuous and categorical variables

Description Usage Arguments Details Value Examples

View source: R/simknockoffs.R

Description

Sequential knockoffs for continuous and categorical variables

Usage

1
knockoffs_seq(X, seq_simulator = sim_EN, ...)

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_EN, 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_EN) these other parameters are passed to cv.glmnet.

Details

knockoffs_seq performs sequential knockoff simulation using elastic-net regression.

Value

sequential knockoff copy of X. A data.frame or tibble of same type and dimensions as X.

Examples

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)

kormama1/seqknockoff documentation built on April 11, 2021, 7:44 a.m.