matrix_kn: A slightly modified version of the knockoff function

Description Usage Arguments Value Note

View source: R/matrix_kn.R

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
matrix_kn(resp, expl, Xko, offset = 0, fdr = 0.2, cores = 2, ...)

Arguments

resp

The response variable, a matrix the same length as expl The first col must be the identifier

expl

The data frame to be the explanatory variables, the first col must be the identifier

Xko

The knockoff variables created seperately (see the 'knockoff' package for more details). Also must be the same length as expl, resp.

offset

The offset is used to control conservative-ness. 0 for liberal and best for smaller data sets, 1 for conservative and larger data sets. 1 can be a very poor choice if you do not have many, many explanatory variables. Passed to the my_kn function.

fdr

The "False Discovery Rate", allowed to be between 0,1 (non-inclusive). Defaults to .2, implying that 1/5 of variables returned will be a type 1 error. This will be passed to the my_kn function.

cores

The cores to be used in the doMC section of the code, passed to the my_kn function.

...

Various other arguments to be passed to the my_kn function.

Value

This will return of data frame 5 columns.

Note

Cores will be rounded to be a natural number


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