Learn R Programming

brainGraph (version 0.48.0)

get.resid: Linear models of columns of a data frame

Description

This function runs linear models on the columns of the input data frame (e.g. cortical thickness data for each region), in order to adjust for relevant variables (e.g. age, sex, group, etc.).

Usage

get.resid(thicknesses, covars)

Arguments

thicknesses
Data frame of all thickness data. First column must be subject ID (or something similar)
covars
Data frame of covariates for the linear model. Must share a subject ID column with thicknesses

Value

  • A list with components:
  • modelsThe lm objects for each brain region.
  • residsData table of studentized residuals for all subjects and brain regions.

See Also

rstudent