get.resid: Linear model residuals in structural covariance networks

Description Usage Arguments Details Value Author(s) See Also

View source: R/get_resid.R

Description

Runs linear models across brain regions listed in a data.table (e.g. cortical thickness), adjusting for variables in covars (e.g. age, sex, etc.), and calculates the externally Studentized (or leave-one-out) residuals.

The [ method will let you reorder or subset residuals based on a given numeric vector. However, this is used in bootstrap and permutation analysis and should generally not be called directly by the user.

Print a summary of residuals for structural covariance data

Usage

1
2
3
4
5
6
7
8
get.resid(dt.vol, covars, method = c("comb.groups", "sep.groups"),
  use.mean = FALSE, exclude = NULL, ...)

## S3 method for class 'brainGraph_resids'
x[i, g = NULL]

## S3 method for class 'brainGraph_resids'
summary(object, regions = NULL, ...)

Arguments

dt.vol

A data.table containing all the volumetric measure of interest (i.e., the object lhrh as ouptut by brainGraph_init)

covars

A data.table of the covariates of interest

method

Character string indicating whether to test models for subject groups separately or combined (default: comb.groups)

use.mean

Logical should we control for the mean hemispheric brain value (e.g. mean LH/RH cortical thickness) (default: FALSE)

exclude

Character vector of covariates to exclude (default: NULL)

...

Arguments passed to brainGraph_GLM_design (optional)

x

A brainGraph_resids object

i

Numeric vector of the indices

g

Character string indicating the group (default: NULL)

object

A brainGraph_resids object

regions

Character vector of region(s) to focus on; default behavior is to show summary for all regions

Details

You can choose to run models for each of your subject groups separately or combined (the default) via the method argument. You may also choose whether or not to include the mean, per-hemisphere structural measure in the models. Finally, you can list variables that are present in covars but you would like to exclude from the models.

Value

An object of class brainGraph_resids with elements:

X

The design matrix

method

The input argument method

use.mean

The input argument use.mean

all.dat.tidy

The tidied data.table of volumetric data (e.g., mean regional cortical thickness) and covariates, along with resids column added

resids.all

The "wide" data.table of residuals

groups

Group names

summary.brainGraph_resids returns a list with two data tables, one of the residuals, and one of only the outlier regions

Author(s)

Christopher G. Watson, [email protected]

See Also

rstudent

Other Structural covariance network functions: IndividualContributions, brainGraph_boot, brainGraph_init, brainGraph_permute, corr.matrix, plot.brainGraph_resids, plot_volumetric


brainGraph documentation built on May 29, 2018, 9:03 a.m.