Learn R Programming

brainGraph (version 2.0.2)

setup_glm: Helper function to set-up for GLM analyses

Description

setup_glm is used to setup the data/objects for any function that uses the main GLM functionality in brainGraph.

Usage

setup_glm(covars, X, con.mat, con.type, con.name, ...)

Arguments

covars

A data.table of covariates

X

Numeric matrix, if you wish to supply your own design matrix (default: NULL)

con.mat

Numeric matrix specifying the contrast(s) of interest; if only one contrast is desired, you can supply a vector

con.type

Character string; either 't' or 'f' (for t or F-statistics). Default: 't'

con.name

Character vector of the contrast name(s); if con.mat has row names, those will be used for reporting results (default: NULL)

...

Other arguments passed to brainGraph_GLM_design

Details

This function performs several tasks: it removes unused levels from covars, removes subjects with incomplete data, creates a design matrix (if not supplied), and supplies names to the contrast matrix.