bootstrip.iter:

Usage Arguments Examples

Usage

1
bootstrip.iter(mat, mod, fn, iterations = c(200, 5000, 1e+05), p_samples = 0.5, mc.cores = 12, smooth.sd = 0)

Arguments

mat
mod
fn
iterations
p_samples
mc.cores
smooth.sd

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
28
29
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (mat, mod, fn, iterations = c(200, 5000, 1e+05), p_samples = 0.5, 
    mc.cores = 12, smooth.sd = 0) 
{
    lims = NA
    subset = rep(TRUE, nrow(mat))
    for (it in iterations) {
        message(paste("sampling", sum(subset), "rows", it, "times"))
        beta = bootstrip(mat[subset, ], mod, fn, it, p_samples, 
            mc.cores)
        if (any(is.na(lims))) {
            lims = bootstrip.limits(beta)
        }
        else {
            lims[subset, ] = bootstrip.limits(beta)
        }
        lims[subset, "samples"] = it
        subset = (lims$pvalue <= (2/it))
        if (sum(subset) < 2) {
            break
        }
    }
    lims$beta.orig = fn(lmFit(mat, mod))
    lims
  }

brentp/bootstrip documentation built on May 13, 2019, 5:11 a.m.