This function is filtering method based on Information Criteria

filter_ic(
  target,
  kmers,
  ic = "mbic2",
  reduce = 0.15,
  attach_correlated = TRUE,
  threshold = 0.9
)

Arguments

target

a numeric response variable

kmers

a matrix of kmers with named columns or an object obtained via generate_kmer_data function.

ic

character name of information criterium. One of "aic", "maic", "bic", "maic2", "mbic", "mbic2". See bigstep package for more information.

reduce

a numeric value from (0, 1) interval. Denotes significance level for preliminary reduction before execution of stepwise procedure. Default to 0.2.

attach_correlated

a logical value indicating whether the highly correlated k-mers should be chosen.

threshold

a numeric threshold from 0 to 1 denoting a threshold for correlation coefficient when attach_correlated is TRUE. Ignored when attach_correlated is FALSE.

Value

a character vector of names of selected kmers

Details

This function uses bigstep package.

Examples

n_seq <- 10
sequence_length <- 10
alph <- letters[1:20]
motifs <- generate_motifs(alph, 4, 4, 4, 6)
kmers <- generate_kmer_data(n_seq, sequence_length, alph,
                            motifs, n_injections = 4)
target <- get_target_additive(kmers)
filter_ic(target, kmers, "mbic2", 0.2)
#> Error in reduce_matrix(dat, minpv = reduce): could not find function "reduce_matrix"