my_kn: A slightly modified version of the knockoff function

Description Usage Arguments Value Note

Description

2 major differences being that the knockoff variables are to be passed directly to the function, not made inside of it; and secondly you can pass the amount of cores wanted directly to the statistic function chosen. Be careful as this may need to be 'NULL'-ed if the statistic function you choose does not allow for multi-cores.

Usage

1
2
my_kn(X, y, Xk = Xk, statistic = stat.glmnet_coefdiff, fdr = 0.2,
  offset = 1, cores = 2)

Arguments

X

The data frame to be the explanatory variables

y

The response variable, a single vector the same length as X

Xk

The knockoff variables created seperately (see the 'knockoff' package for more details)

statistic

The statistic to be used in the variable selection process. Defaults to the difference in coeffiecents for a basic linear model.

fdr

The False Discovery Rate bounded between (0,1). The default is .1

offset

Allows for more or less conservative selections. 1 for more (default) , 0 for less.

cores

The number of cores you would like to use. The default is 2. If more is stated than is possible an error will be returned.

Value

Same as with the standard knockoff package function 'knockoff.filter', see that for more.

Note

This funtion can only be used *after* creating the knockoff variables, the goal was to split those two functions inorder to get a a faster speed up on the loop for response variables with the same explanatory variables.


vinny-paris/the_knockoff_of_a_knockoff documentation built on May 26, 2019, 12:32 p.m.