Learn R Programming

brainGraph (version 2.2.0)

setup_randomise: Helper function to setup for randomise

Description

setup_randomise is used to setup the data/objects for any function that does permutations for GLM-based analysis.

Randomize and fit a model and find the maximum statistic

Usage

setup_randomise(X, con.mat, nC)

randomise(ctype, N, perms, DT, nC, measure, X, con.mat, alternative)

Arguments

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

nC

Integer; the number of contrasts

N

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

perms

Matrix of permutations, if you would like to provide your own (default: NULL)

DT

data.table with outcome variables

measure

Character string of the graph measure of interest

alternative

Character string, whether to do a two- or one-sided test (default: 'two.sided')

Details

The tasks performed by this function are: separate the design matrix into the independent variables of interest and nuisance variables (based on the contrast(s)), and calculate the new contrast(s) based on this new design matrix.