Adjust a training vector value by nuisance variables eg field strength etc. One may want to use a specific sub-group for this, e.g. controls.

adjustByCovariates(
  mxdfin,
  adjustmentFormula,
  groupVariable,
  group,
  allowMissing = FALSE
)

Arguments

mxdfin

Input data frame with repeated measurements and a grouped time variable

adjustmentFormula

string defining a valid formula to be used in lm.

groupVariable

names of the column that defines the group to use for training.

group

string defining a subgroup on which to train

allowMissing

boolean

Value

data frame with adjusted measurement variable as defined in formula

Author

Avants BB

Examples

mydf = generateSubtyperData( 100 )
myform = "cognition ~ RandomBasisProjection01 "
mydf = adjustByCovariates(mydf,myform,"DX","G0")