Introduction
In this vignette we demonstrate the main functionalities of the
knockofftools package. In particular, we demonstrate functions for
generating data sets, simulating knockoffs (MX and sequential), applying
the multiple knockoff filter for variable selection and visualizing
selections.
Let’s first recall how the knockoff variable selection methodology
works in a nutshell:
- Simulate a knockoff copy
of the original covariates data
.
- Compute feature statistics
from an aggregated regression of
on
and
.
Large, positive statistics
indicate association of
with
.
- For FDR control use the
knockoffs
procedure to select variables
that fulfill
where
This workflow selects variables
associated with response with guaranteed control of false discovery rate
.
library(zKnock)
#> Warning: replacing previous import 'spls::spls' by 'mixOmics::spls' when
#> loading 'zKnock'
#> Warning: replacing previous import 'mixOmics::spls' by 'spls::spls' when
#> loading 'zKnock'