bbcor: Bayesian Bootstrapping Correlations

Description Usage Arguments Value Note Examples

View source: R/bbcor.R

Description

Efficiently draws samples from the posterior distribution of various correlation coefficients

Usage

1
bbcor(x, method = "pearson", iter = 5000, cores = 2)

Arguments

x

A matrix of dimensions n by p

method

Character string. Which correlation coefficient should be computed. One of "pearson" (default), "kendall", "spearman", "polychoric", "gaussian_rank", or "blomqvist" (i.e., median correlation).

iter

Numeric. How many posterior samples (defaults to 5000) ?

cores

Numeric. How many cores for parallel computing (defaults to 2)?

Value

Note

NAs are removed.

Examples

1
2
3
Y <- mtcars[,1:2]

bb_samps <- bbcor(Y, method = "spearman")

BBcor documentation built on Oct. 14, 2021, 5:22 p.m.