Description Usage Arguments Value See Also Examples
filter_gam takes the inmportance statistic W as input. The filter determines the order of the statistic by the probability of being a null. The probability is given by GAM.
1 2 3 4 5 6 7 8 9 | filter_gam(
W,
U,
alpha = 0.1,
offset = 1,
df_list = 6:10,
reveal_prop = 0.1,
mute = TRUE
)
|
W |
vector of length p, denoting the imporatence statistics calculated by |
U |
p-by-r matrix of side information. |
alpha |
(a vector of) target FDR levels (default is 0.1). |
df_list |
A list of candidates for the degree of freedom of the splines (default is 6:10). |
reveal_prop |
The proportion of hypotheses revealed according to |W| (default is 0.1). |
mute |
whether \hat{fdp} of each iteration is printed (defalt is TRUE). |
A list of the following:
nrejs |
The number of rejections for each specified target fdr (alpha) level |
rejs |
Rejsction set fot each specified target fdr (alpha) level |
rej.path |
The order of the hypotheses (used for diagnostics) |
unrevealed.id |
id of the hypotheses that are nor revealed in the end (used for diagnostics) |
Other filter:
filter_EM()
,
filter_glmnet()
,
filter_glm()
,
filter_randomForest_getorder()
,
filter_randomForest()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #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_gam to obtain the final rejeciton set
z = 1:p #Use the location of the hypotheses as the side information
result = filter_gam(W,z)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.