adapTMLE-class: Constructor for class adaptmle

Description Value Examples

Description

Constructor for class adaptmle

Value

class adaptmle object, sub-classed from SummarizedExperiment.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
library(SummarizedExperiment)
library(airway)
data(airway)

example_adaptmle_class <- function(se, n_top = 20, n_fold = 10) {
    call <- match.call(expand.dots = TRUE)
    adaptmle <- .adaptmle(
         SummarizedExperiment::SummarizedExperiment(
            assays = SummarizedExperiment::assay(se),
            colData = SummarizedExperiment::colData(se)
         ),
         call = call,
         folds = list(),  # folds (from origami)
         plot_ingredients = list(),  # top_colname
         diff_exp = as.numeric(rep(NaN, n_top)),  # DE
         p_value = as.numeric(rep(NaN, n_top)),  # p_value
         q_value = as.numeric(rep(NaN, n_top)),  # q_value
         q_sig = as.numeric(rep(NaN, n_top)),  # significant_q
         q_sig_names = list(),  # top_colname_significant_q
         rank_mean = as.numeric(rep(NaN, n_top * n_fold)),  # mean_rank_top
         prob_top = as.numeric(rep(NaN, n_top * n_fold)),  # prob_in_top
         top_index = as.numeric(rep(NaN, n_top * n_fold))  # top_index
    )
    return(adaptmle)
}

example_class <- example_adaptmle_class(se = airway)

adaptest documentation built on April 28, 2020, 7:24 p.m.