setup_glm
is used to setup the data/objects for any function that uses
the main GLM functionality in brainGraph
.
Helper function for GLM fitting
setup_glm(covars, X, con.mat, con.type, con.name, ...)glm_fit_helper(DT, X, con.type, con.mat, alt, measure, mykey)
A data.table
of covariates
Numeric matrix, if you wish to supply your own design matrix
(default: NULL
)
Numeric matrix specifying the contrast(s) of interest; if only one contrast is desired, you can supply a vector
Character string; either 't'
or 'f'
(for t or
F-statistics). Default: 't'
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
A data.table with all the necessary data
Character string of the graph measure of interest
The key
to key by (to differentiate NBS and other GLM
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.