Learn R Programming

ComBatFamQC (version 1.0.5)

eb_check: EB Assumption Check

Description

Generate the empirical and prior distribution of both the location parameter gamma and the scale parameter delta.

Usage

eb_check(
  data,
  bat,
  covar = NULL,
  model = lm,
  formula = NULL,
  robust.LS = FALSE,
  ref.batch = NULL,
  ...
)

Value

eb_check returns a dataframe containing the empirical and prior distribution of both the location parameter (gamma) and the scale parameter (delta).

Arguments

data

n x p data frame or matrix of observations where p is the number of features and n is the number of subjects.

bat

Factor indicating batch (often equivalent to site or scanner).

covar

Data frame or matrix of covariates supplied to model.

model

The model function that ComBat Family supports: lm, lmer, gam.

formula

Formula for model starting with y ~ where y represents each feature.

robust.LS

If TRUE, uses robust location and scale estimators for error variance and site effect parameters. Currently uses median and biweight midvariance.

ref.batch

Reference batch, must take value in levels(bat).

...

Additional arguments to model.

Examples

Run this code
eb_check(data = adni[1:500,43:53], bat = as.factor(adni$manufac[1:500]),
covar = adni[1:500, c("AGE", "SEX")], model = lm, formula = y ~ AGE + SEX)

Run the code above in your browser using DataLab