sparccboot: Bootstrap SparCC

View source: R/spaRcc.R

sparccbootR Documentation

Bootstrap SparCC

Description

Get bootstrapped estimates of SparCC correlation coefficients. To get empirical p-values, pass this output to pval.sparccboot.

Usage

sparccboot(
  data,
  sparcc.params = list(),
  statisticboot = function(data, indices) triu(do.call("sparcc", c(list(data[indices, ,
    drop = FALSE]), sparcc.params))$Cor),
  statisticperm = function(data, indices) triu(do.call("sparcc",
    c(list(apply(data[indices, ], 2, sample)), sparcc.params))$Cor),
  R,
  ncpus = 1,
  ...
)

Arguments

data

Community count data

sparcc.params

named list of parameters to pass to sparcc

statisticboot

function which takes data and bootstrap sample indices and results the upper triangle of the bootstapped correlation matrix

statisticperm

function which takes data and permutated sample indices and results the upper triangle of the null correlation matrix

R

number of bootstraps

ncpus

number of cores to use for parallelization

...

additional arguments that are passed to boot::boot


zdk123/SpiecEasi documentation built on Oct. 20, 2023, 6:49 a.m.