bbcor {BBcor}R Documentation

Bayesian Bootstrapping Correlations

Description

Efficiently draws samples from the posterior distribution of various correlation coefficients

Usage

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", "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


Y <- mtcars[,1:2]

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


[Package BBcor version 1.0.1 Index]