Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/brainGraph_GLM.R

`brainGraph_GLM`

specifies and fits a linear model at each vertex for a
given vertex measure (e.g. *degree*) or at the graph-level (e.g.,
*global efficiency*). Given a contrast matrix, it will calculate the
associated statistics.

1 2 3 4 |

`g.list` |
A list of |

`covars` |
A |

`measure` |
Character string of the graph measure of interest |

`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 |

`X` |
Numeric matrix, if you wish to supply your own design matrix
(default: |

`con.name` |
Character vector of the contrast name(s); if |

`alternative` |
Character string, whether to do a two- or one-sided test
(default: |

`alpha` |
Numeric; the significance level (default: 0.05) |

`level` |
Character string; either |

`permute` |
Logical indicating whether or not to permute group labels
(default: |

`N` |
Integer; number of permutations to create (default: 5e3) |

`perms` |
Matrix of permutations, if you would like to provide your own
(default: |

`long` |
Logical indicating whether or not to return all permutation
results (default: |

`...` |
Other arguments passed to |

The input list of graphs `g.list`

must not be nested; i.e., if you have
multiple groups, they will have to be combined into one list. See the code in
the Examples below.

A `data.table`

of covariates is required input; the first column
*must* be named *Study.ID*. Additionally, all graphs must
have a *name* attribute (at the graph level) which matches the
*Study.ID* for a given subject. If you create the design matrix
`X`

yourself, you still must supply the covariates table so that
subjects can be correctly matched with their network data.

Both t- and F-contrasts are allowed. You may supply a *matrix* to the
argument `con.mat`

. If you supply a multi-row matrix and you choose
`con.type="t"`

, then statistics will be calculated for each contrast
individually. If you choose `con.type="f"`

, in the result data table,
`ESS`

stands for "extra sum of squares", the additional variance
explained for by the model parameters of interest (as determined by the
contrast matrix). Finally, the standard error in these tables is the sum of
squared errors of the *full model*.

Finally, you can calculate permutations of the data to build a null
distribution of the maximum statistic, to provide control over false
positives. The permutation strategy is that of Freedman & Lane (1983), and
is the same as that in FSL's *randomise*.

An object of class `bg_GLM`

containing some input-specific
variables, in addition to:

`X` |
A numeric matrix; a copy of the |

`y` |
A numeric vector or matrix of the outcome variable |

`DT` |
A data table with an entry for each vertex (region) containing statistics of interest |

`removed` |
A character vector of Study.ID's removed due to incomplete data (if any) |

`perm` |
A list containing: |

.

Christopher G. Watson, [email protected]

Freedman D & Lane D (1983). *A nonstochastic interpretation
of reported significance levels*. J Bus Econ Stat, 1(4):292-298.

Nichols TE & Holmes AP (2001). *Nonparametric permutation
tests for functional neuroimaging: A primer with examples.* Human Brain
Mapping, 15(1):1-25.

Winkler AM, Ridgway GR, Webster MA, Smith SM, Nichols TE (2014).
*Permutation inference for the general linear model*. NeuroImage,
92:381-397.

Other GLM functions: `GLMfit`

,
`brainGraph_GLM_design`

, `mtpc`

Other Group analysis functions: `IndividualContributions`

,
`NBS`

, `brainGraph_boot`

,
`brainGraph_mediate`

,
`brainGraph_permute`

, `mtpc`

1 2 3 4 5 6 7 8 9 10 11 | ```
## Not run:
conmat <- matrix(c(0, 0, 0, 1), nrow=1)
rownames(conmat) <- 'Control > Patient'
## Note that I concatenate the graphs from each group's 6th threshold
g.lm <- brainGraph_GLM(g.list=do.call(Map, c(c, g))[[6]],
covars=covars.all[tract == 1],
measure='strength', con.mat=conmat, alt='greater',
permute=TRUE, long=TRUE)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.