Description Usage Arguments Value See Also Examples
View source: R/plot_ordering.R
Plot_ordering takes the adaptive knockoff result as input and plot the ordering.
1 | plot_ordering(mdl, nonzero = NULL, start_index = 1, alpha = NULL)
|
mdl |
the result given by adaptive knockoff filters. |
nonzero |
The true signals (default is NULL). |
A plot of the realized ordering of hypotheses.
Other plot:
plot_rank()
,
plot_vanilla()
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.