corrmat_covariance_from_datamatrix: Calculate the Average Covariance Matrix of a Sample of...

Description Usage Arguments Value See Also

View source: R/corrmat_covariance.R

Description

Calculate the average covariance matrix of multiple correlation matrices.

Usage

1
2
3
4
5
6
7
8
9
corrmat_covariance_from_datamatrix(
  datamatrix,
  fisher_z = FALSE,
  est_n = FALSE,
  only_diag = TRUE,
  nonpositive = c("ignore", "stop", "force"),
  use_cpp = TRUE,
  ncores = 1
)

Arguments

datamatrix

the sample of correlation matrices. can be an array of matrices, or a matrix of vectorized correlation matrices.

fisher_z

if true, calculate the covariance matrix of a fisher-Z transformed correlation matrix. It is assumed that the correlations are already Fisher transformed, and the matrix will under go the Inverse Fisher Transformation.

est_n

whether to divide the covariance matrix by the estimated degrees of freedom, with a linear projection.

only_diag

passed to compute_estimated_n

nonpositive

error handling when matrix is not positive definite. can be one of 'stop', 'force', 'ignore'. if 'force' is chosen, nearPD will be used.

use_cpp

whether to use c++ source code. default true.

ncores

number of cores to use, if parallelization is in use.

Value

the averaged covariance matrix

See Also

Other corrcalc: corrcalc_c(), corrmat_covariance()


itamarfaran/corrpops documentation built on Dec. 20, 2021, 8:02 p.m.