test_regress: Regression tests

View source: R/test_regress.R

test_regressR Documentation

Regression tests

Description

Examine if harmonization affects batch and covariate associations. Options to regress edge weights and mean edge weights within and between subnetworks.

Usage

test_regress(
  ...,
  bat = NULL,
  mod = NULL,
  roi.names = NULL,
  labs = c("Raw", "Out"),
  tests = c("Elem", "Group"),
  fisher = TRUE,
  to.corr = FALSE,
  debug = FALSE
)

Arguments

...

p x p x n covariance or correlation matrices where p is the number of ROIs and n is the number of subjects. These are generally unharmonized or harmonized datasets and should have the same dimensions.

bat

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

mod

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

roi.names

Vector of names for regions of interest. For "Group" tests, roi.names defines subnetworks of interest. If NULL, the dimension names of each dataset are used.

labs

Vector of labels for the harmonization methods, in order of the inputted datasets.

tests

Vector of tests to apply. "Elem" refers to regression on each edge weight. "Group" refers to regression on mean edge weights within and between each subnetwork, as defined by roi.names.

fisher

Whether to z-transform input FC matrices

to.corr

Logical, whether input should be forced to be a correlation matrix using cov2cor

debug

Whether to return intermediate objects for debugging


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