This function creates the knockoffs, computes the test statistics, and selects
variables.
It is the main entry point for the model-free knockoff package.
The parameter knockoffs controls how knockoff variables are created.
By default, a multivariate normal distribution is fitted to the original
variables in X. The estimated mean vector and covariance matrix are used
to generate second-order approximate Gaussian knockoffs.
In general, knockoffs should be a function taking a n-by-p matrix of
observed variables X and returning a n-by-p matrix of knockoff variables.
Two optional functions for creating knockoffs are provided with this package.
If the rows of X are distributed as a multivariate Gaussian with known parameters,
then the function MFKnockoffs.create.gaussian can be used to generate
valid Gaussian knockoff variables, as shown in the examples below.
If the design matrix X is assumed to be fixed instead of random, one can create
knockoff variables using the function MFKnockoffs.create.fixed. This
corresponds to the original framework of the (non Model-Free) knockoff filter.
For more information about creating knockoffs, type ??MFKnockoffs.create.
The default test statistic is MFKnockoffs.stat.glmnet_coef_difference.
For a complete list of the statistics provided with this package,
type ??MFKnockoffs.stat.
It is also possible to provide custom test statistics.
An example can be found in the vignette.