fcCovBat: Functional connectivity CovBat

View source: R/fcCovBat.R

fcCovBatR Documentation

Functional connectivity CovBat

Description

Applies CovBat to vectorized covariance or correlation matrices.

Usage

fcCovBat(
  x,
  bat,
  mod = NULL,
  eb = TRUE,
  percent.var = 0.95,
  to.corr = TRUE,
  out.pd = FALSE,
  fisher = TRUE
)

Arguments

x

p x p x n covariance or correlation matrices where p is the number of ROIs and n is the number of subjects.

bat

Factor (or object coercible by as.factor to a factor) of length n designating batch IDs.

mod

Optional design matrix of covariates to preserve, usually from the output of model.matrix.

eb

If 'TRUE“, uses ComBat model with empirical Bayes for mean and variance harmonization.

percent.var

Numeric. The number of harmonized principal component scores is selected to explain this proportion of the variance.

to.corr

If TRUE, uses cov2cor to convert input matrices into correlation matrices

out.pd

Whether input should be forced to be positive definite using nearPD. This step is unnecessary for many downstream network analyses so defaults to FALSE.

fisher

Whether to Fisher-transform the off-diagonal elements before applying CovBat, highly recommended that this be set to TRUE.


andy1764/FCHarmony documentation built on April 4, 2022, 10:41 a.m.