kobt.select: Knockoff Variable Selection

Description Usage Arguments Value References Examples

View source: R/kobt.select.R

Description

Use knockoff to conduct variable selection with false discovery rarte control.

Usage

1
kobt.select(score, fdr = 0.1, type = "modified")

Arguments

score

An n by 2p matrix of test statistics, which includes test statistics from n samples, p variables (first p columns), and p knockoff variables (last p columns).

fdr

The targeted false discovery rate (FDR), the default value is 0.1.

type

A charactor showing the type of calculated false discovery rate: (1) modified and (2) usual FDR, the default value is modified.

Value

Indices of selected columns/variables in the n by p original design matrix.

References

\insertRef

candes2018panningKOBT

Examples

1
2
3
4
5
6
7
8
set.seed(1010)
n <- 100
p <- 100
signal.num <- 20
W_left <- matrix(rnorm(n = n*signal.num, mean = 1, sd = 1), nrow = n)
W_right <- matrix(rnorm(n = n*(2*p-signal.num), mean = 0, sd = 1), nrow = n)
W <- cbind(W_left, W_right)
selected.index <- kobt.select(score = W)

KOBT documentation built on Feb. 20, 2020, 5:08 p.m.