plot_ordering: Diagnostics for adative knockoff results

Description Usage Arguments Value See Also Examples

View source: R/plot_ordering.R

Description

Plot_ordering takes the adaptive knockoff result as input and plot the ordering.

Usage

1
plot_ordering(mdl, nonzero = NULL, start_index = 1, alpha = NULL)

Arguments

mdl

the result given by adaptive knockoff filters.

nonzero

The true signals (default is NULL).

Value

A plot of the realized ordering of hypotheses.

See Also

Other plot: plot_rank(), plot_vanilla()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#Generating data
p=100;n=100;k=40;
mu = rep(0,p); Sigma = diag(p)
X = matrix(rnorm(n*p),n)
nonzero = 1:k
beta = 5*(1:p%in%nonzero)*sign(rnorm(p))/ sqrt(n)
y = X%*%beta + rnorm(n,1)

#Generate knockoff copy
Xk = create.gaussian(X,mu,Sigma)

#Generate importance statistic using knockoff package
W = stat.glmnet_coefdiff(X,Xk,y)

#Using filer_EM to obtain the final rejeciton set
U = 1:p #Use the location of the hypotheses as the side information
result = filter_randomForest(W,U)
plot_ordering(result,nonzero = nonzero)

zhimeir/adaptiveKnockoffs documentation built on Oct. 6, 2021, 9:41 p.m.