eb_check function

EB Assumption Check

EB Assumption Check

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

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

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.

Returns

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

Examples

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)