bootstrapSE {mbmixture}R Documentation

Bootstrap to get standard errors

Description

Perform a parametric bootstrap to get estimated standard errors.

Usage

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

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 estimated standard errors.

Value

If return_raw=FALSE, a vector of two standard errors. If return_raw=TRUE, an matrix of size n_rep x 2 with the detailed bootstrap results.

See Also

bootstrapNull()

Examples

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


[Package mbmixture version 0.4 Index]