multi_select: Select variables based on (heuristic) mode of multiple...

Description Usage Arguments Value Examples

View source: R/knockoff_filters.R

Description

Select variables based on (heuristic) mode of multiple variable selections

Usage

1
multi_select(S, p, trim = 0.5)

Arguments

S

list of variable selection indices

p

number of variables. Each element of the list of selection indices should be a subset of 1:p.

trim

trimming probability threshold. A sensible default is trim=0.5.

Value

a single "most frequent" variable selection among the multiple selections in S.

Examples

1
2
3
4
5
6
7
8
9
library(seqknockoff)

set.seed(1)

S <- list(c(sample(1:10,7), sample(11:20,1)),
c(sample(1:10,7), sample(11:20,1)),
c(sample(1:10,7), sample(11:20,1)))

multi_select(S, p=20)

kormama1/seqknockoff documentation built on April 11, 2021, 7:44 a.m.