bootstrapNull {mbmixture}R Documentation

Bootstrap to assess significance

Description

Perform a parametric bootstrap to assess whether there is significant evidence that a sample is a mixture.

Usage

bootstrapNull(
  tab,
  n_rep = 1000,
  interval = c(0, 1),
  tol = 0.000001,
  check_boundary = TRUE,
  cores = 1,
  return_raw = TRUE
)

Arguments

tab

Dataset of read counts as 3d array of size 3x3x2, genotype in first sample x genotype in second sample x allele in read.

n_rep

Number of bootstrap replicates

interval

Interval to which each parameter should be constrained

tol

Tolerance for convergence

check_boundary

If TRUE, explicitly check the boundaries of interval.

cores

Number of CPU cores to use, for parallel calculations. (If 0, use parallel::detectCores().) Alternatively, this can be links to a set of cluster sockets, as produced by parallel::makeCluster().

return_raw

If TRUE, return the raw results. If FALSE, just return the p-value. Unlink bootstrapSE(), here the default is TRUE.

Value

If return_raw=FALSE, a single numeric value (the p-value).If return_raw=TRUE, a vector of length n_rep with the LRT statistics from each bootstrap replicate.

See Also

bootstrapSE()

Examples

data(mbmixdata)
# just 100 bootstrap replicates, as an illustration
bootstrapNull(mbmixdata, n_rep=100)


[Package mbmixture version 0.4 Index]