Skip to contents

Helper: perform rapid (parallel) partial correlation calculations on a matrix

Usage

.partial_correlation(x, covs, covs_alt = NULL, ncores = 1)

Arguments

x

matrix of variables over which to calculate pairwise correlations

covs

matrix of variables that serve as covariates

covs_alt

alternate matrix of variables that serve as covariates when pairwise correlation is not complete

ncores

number of cores over which to parallelize

Value

data.table with unweighted pairwise partial correlations