blComBat: Method for harmonization while accounting for subnetworks

View source: R/blComBat.R

blComBatR Documentation

Method for harmonization while accounting for subnetworks

Description

Global ComBat followed by within-block ComBat

Usage

blComBat(
  x,
  bat,
  mod = NULL,
  blocks = dimnames(x)[[1]],
  eb = TRUE,
  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.

blocks

Blocks indicating submatrices that are harmonized in the second-stage ComBat. Defaults to input dimension names.

eb

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

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.