knockoff_filter_from_stats: Runs knockoff procedure abbreviated

Description Usage Arguments Details Value References

View source: R/knockoff_filter_from_stats.R

Description

Runs knockoff procedure for Fixed-X from Barber & Candes (2015) but takes in X, knockoffs, y, and statistics, and computes threshold and returns selected variables. This can be used when using both knockoff and knockoff+ procedures, the output from one procedure can be put into this function, which will compute the threshold and return selected variables from the other procedure.

Usage

1
knockoff_filter_from_stats(X, y, fdr = 0.2, plus = TRUE, Xk, W)

Arguments

X

n-by-p design matrix, with n > p.

y

response vector of length n.

fdr

desired false discovery rate.

plus

True for knockoff+ procedure, false for knockoff procedure.

Xk

n-by-p knockoff matrix.

W

W test statistics.

Details

This runs the knockoff filter for a given X matrix and y vector. This controls the false discovery rate at a given level. This takes in the knockoffs and test statistics and returns the threshold and selected variables. It should be used to reduce computation when running both knockoff and knockoff+ procedures on the same data.

Value

A list containing:

X

n-by-p design matrix, rescaled so that ||X_j||^2_2 = 1, and augmented if n < 2p.

y

vector of observed responses (augmented if n < 2p).

Xk

n-by-p matrix of knockoff variables.

W

vector of test statistics.

thresh

threshold for variable selection.

Selected

list of selected variables.

References

Barber and Candes, Controlling the false discovery rate via knockoffs. Ann. Statist. 43 (2015), no. 5, 2055–2085. https://projecteuclid.org/euclid.aos/1438606853


svteichman/prelim.knockoffs documentation built on May 28, 2020, 5:14 p.m.