Title: | Network-Based R-Statistics using Mixed Effects Models |
---|---|
Description: | An implementation of network-based statistics in R using mixed effects models. Theoretical background for Network-Based Statistics can be found in Zalesky et al. (2010) <doi:10.1016/j.neuroimage.2010.06.041>. For Mixed Effects Models check the R package <https://CRAN.R-project.org/package=nlme>. |
Authors: | Zeus Gracia-Tabuenca [aut, cre], Sarael Alcauter [aut] |
Maintainer: | Zeus Gracia-Tabuenca <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1.5 |
Built: | 2024-10-31 06:50:18 UTC |
Source: | CRAN |
This function computes the specified linear model (LM) for each edge in the network, and calculates the multiple testing p-value based on the p.adjust function.
edge_lm(net, nnodes, idata, mod, diag = FALSE, padj, cores = NULL, expList = NULL, verbose = TRUE, ...)
edge_lm(net, nnodes, idata, mod, diag = FALSE, padj, cores = NULL, expList = NULL, verbose = TRUE, ...)
net |
3D volume (2D matrices for each observation) or 2D matrix of edges as columns. |
nnodes |
Number of network nodes. |
idata |
Matrix or data.frame including independent variables of interest of the model. |
mod |
Model, specify as a string, e.g., "~Group + Age". |
diag |
Logical indicating if matrix diagonal is to be included in the analysis (default: FALSE). |
padj |
Character string that indicates the p.adjust method. |
cores |
Number of selected cores for parallel computing (default: NULL). |
expList |
Character string adding variable names to the varlist of 'clusterExport' (default: NULL). |
verbose |
Logical indicating if messages should be printed (default: TRUE). |
... |
Additional arguments to be passed to the low level 'lm' function. |
It's VERY IMPORTANT when giving net as a 2D matrix or data.frame, to be completely sure that column distribution fits that of the upper triangle indices of an nnodes * nnodes matrix. This may be verified through the edge indices, e.g., "which(upper.tri(matrix(nrow = nnodes, ncol = nnodes)), arr.ind = T)" (see vignette NBR-LME for more details).
To know more about padj methods, check help for the p.adjust
function. It is
noticeable that this multiple comparison approach can be much more faster than the permutations run by
the Network-Based Statistics framework, however this is a much more conservative approach
(see Zalesky et al. (2010) doi:10.1016/j.neuroimage.2010.06.041 for more detail).
data.frame containing the edge labels, observed statistics, their corresponding p-value, and their adjusted p-values.
data(frontal2D) edge_result <- edge_lm(net = frontal2D[,-(1:3)], nnodes = 28, idata = frontal2D[,1:3], mod = "~ Group + Sex * Age", padj = "fdr") head(edge_result) if(any(edge_result[,5]<0.05)){ show(edge_result[which(edge_result[,5]<0.05),1:5]) }
data(frontal2D) edge_result <- edge_lm(net = frontal2D[,-(1:3)], nnodes = 28, idata = frontal2D[,1:3], mod = "~ Group + Sex * Age", padj = "fdr") head(edge_result) if(any(edge_result[,5]<0.05)){ show(edge_result[which(edge_result[,5]<0.05),1:5]) }
A dataset containing the functional connectivity between frontal lobe areas of the brain in 24 control and 24 patients with Attention-Deficit/Hyperactivity Disorder (ADHD).
frontal2D
frontal2D
A data frame with 48 rows and 381 variables:
Diagnostic group factor, control or patient.
Factor, female (F) or male (M).
Chronological age in years, numeric.
Functional connectivity between FAG and FAD regions, numeric
Functional connectivity between FAG and F1G regions, numeric
Functional connectivity between FAD and F1G regions, numeric
Functional connectivity between FAG and F1D regions, numeric
Functional connectivity between FAD and F1D regions, numeric
Functional connectivity between F1G and F1D regions, numeric
Functional connectivity between FAG and F1OG regions, numeric
Functional connectivity between FAD and F1OG regions, numeric
Functional connectivity between F1G and F1OG regions, numeric
Functional connectivity between F1D and F1OG regions, numeric
Functional connectivity between FAG and F1OD regions, numeric
Functional connectivity between FAD and F1OD regions, numeric
Functional connectivity between F1G and F1OD regions, numeric
Functional connectivity between F1D and F1OD regions, numeric
Functional connectivity between F1OG and F1OD regions, numeric
Functional connectivity between FAG and F2G regions, numeric
Functional connectivity between FAD and F2G regions, numeric
Functional connectivity between F1G and F2G regions, numeric
Functional connectivity between F1D and F2G regions, numeric
Functional connectivity between F1OG and F2G regions, numeric
Functional connectivity between F1OD and F2G regions, numeric
Functional connectivity between FAG and F2D regions, numeric
Functional connectivity between FAD and F2D regions, numeric
Functional connectivity between F1G and F2D regions, numeric
Functional connectivity between F1D and F2D regions, numeric
Functional connectivity between F1OG and F2D regions, numeric
Functional connectivity between F1OD and F2D regions, numeric
Functional connectivity between F2G and F2D regions, numeric
Functional connectivity between FAG and F2OG regions, numeric
Functional connectivity between FAD and F2OG regions, numeric
Functional connectivity between F1G and F2OG regions, numeric
Functional connectivity between F1D and F2OG regions, numeric
Functional connectivity between F1OG and F2OG regions, numeric
Functional connectivity between F1OD and F2OG regions, numeric
Functional connectivity between F2G and F2OG regions, numeric
Functional connectivity between F2D and F2OG regions, numeric
Functional connectivity between FAG and F2OD regions, numeric
Functional connectivity between FAD and F2OD regions, numeric
Functional connectivity between F1G and F2OD regions, numeric
Functional connectivity between F1D and F2OD regions, numeric
Functional connectivity between F1OG and F2OD regions, numeric
Functional connectivity between F1OD and F2OD regions, numeric
Functional connectivity between F2G and F2OD regions, numeric
Functional connectivity between F2D and F2OD regions, numeric
Functional connectivity between F2OG and F2OD regions, numeric
Functional connectivity between FAG and F3OPG regions, numeric
Functional connectivity between FAD and F3OPG regions, numeric
Functional connectivity between F1G and F3OPG regions, numeric
Functional connectivity between F1D and F3OPG regions, numeric
Functional connectivity between F1OG and F3OPG regions, numeric
Functional connectivity between F1OD and F3OPG regions, numeric
Functional connectivity between F2G and F3OPG regions, numeric
Functional connectivity between F2D and F3OPG regions, numeric
Functional connectivity between F2OG and F3OPG regions, numeric
Functional connectivity between F2OD and F3OPG regions, numeric
Functional connectivity between FAG and F3OPD regions, numeric
Functional connectivity between FAD and F3OPD regions, numeric
Functional connectivity between F1G and F3OPD regions, numeric
Functional connectivity between F1D and F3OPD regions, numeric
Functional connectivity between F1OG and F3OPD regions, numeric
Functional connectivity between F1OD and F3OPD regions, numeric
Functional connectivity between F2G and F3OPD regions, numeric
Functional connectivity between F2D and F3OPD regions, numeric
Functional connectivity between F2OG and F3OPD regions, numeric
Functional connectivity between F2OD and F3OPD regions, numeric
Functional connectivity between F3OPG and F3OPD regions, numeric
Functional connectivity between FAG and F3TG regions, numeric
Functional connectivity between FAD and F3TG regions, numeric
Functional connectivity between F1G and F3TG regions, numeric
Functional connectivity between F1D and F3TG regions, numeric
Functional connectivity between F1OG and F3TG regions, numeric
Functional connectivity between F1OD and F3TG regions, numeric
Functional connectivity between F2G and F3TG regions, numeric
Functional connectivity between F2D and F3TG regions, numeric
Functional connectivity between F2OG and F3TG regions, numeric
Functional connectivity between F2OD and F3TG regions, numeric
Functional connectivity between F3OPG and F3TG regions, numeric
Functional connectivity between F3OPD and F3TG regions, numeric
Functional connectivity between FAG and F3TD regions, numeric
Functional connectivity between FAD and F3TD regions, numeric
Functional connectivity between F1G and F3TD regions, numeric
Functional connectivity between F1D and F3TD regions, numeric
Functional connectivity between F1OG and F3TD regions, numeric
Functional connectivity between F1OD and F3TD regions, numeric
Functional connectivity between F2G and F3TD regions, numeric
Functional connectivity between F2D and F3TD regions, numeric
Functional connectivity between F2OG and F3TD regions, numeric
Functional connectivity between F2OD and F3TD regions, numeric
Functional connectivity between F3OPG and F3TD regions, numeric
Functional connectivity between F3OPD and F3TD regions, numeric
Functional connectivity between F3TG and F3TD regions, numeric
Functional connectivity between FAG and F3OG regions, numeric
Functional connectivity between FAD and F3OG regions, numeric
Functional connectivity between F1G and F3OG regions, numeric
Functional connectivity between F1D and F3OG regions, numeric
Functional connectivity between F1OG and F3OG regions, numeric
Functional connectivity between F1OD and F3OG regions, numeric
Functional connectivity between F2G and F3OG regions, numeric
Functional connectivity between F2D and F3OG regions, numeric
Functional connectivity between F2OG and F3OG regions, numeric
Functional connectivity between F2OD and F3OG regions, numeric
Functional connectivity between F3OPG and F3OG regions, numeric
Functional connectivity between F3OPD and F3OG regions, numeric
Functional connectivity between F3TG and F3OG regions, numeric
Functional connectivity between F3TD and F3OG regions, numeric
Functional connectivity between FAG and F3OD regions, numeric
Functional connectivity between FAD and F3OD regions, numeric
Functional connectivity between F1G and F3OD regions, numeric
Functional connectivity between F1D and F3OD regions, numeric
Functional connectivity between F1OG and F3OD regions, numeric
Functional connectivity between F1OD and F3OD regions, numeric
Functional connectivity between F2G and F3OD regions, numeric
Functional connectivity between F2D and F3OD regions, numeric
Functional connectivity between F2OG and F3OD regions, numeric
Functional connectivity between F2OD and F3OD regions, numeric
Functional connectivity between F3OPG and F3OD regions, numeric
Functional connectivity between F3OPD and F3OD regions, numeric
Functional connectivity between F3TG and F3OD regions, numeric
Functional connectivity between F3TD and F3OD regions, numeric
Functional connectivity between F3OG and F3OD regions, numeric
Functional connectivity between FAG and ORG regions, numeric
Functional connectivity between FAD and ORG regions, numeric
Functional connectivity between F1G and ORG regions, numeric
Functional connectivity between F1D and ORG regions, numeric
Functional connectivity between F1OG and ORG regions, numeric
Functional connectivity between F1OD and ORG regions, numeric
Functional connectivity between F2G and ORG regions, numeric
Functional connectivity between F2D and ORG regions, numeric
Functional connectivity between F2OG and ORG regions, numeric
Functional connectivity between F2OD and ORG regions, numeric
Functional connectivity between F3OPG and ORG regions, numeric
Functional connectivity between F3OPD and ORG regions, numeric
Functional connectivity between F3TG and ORG regions, numeric
Functional connectivity between F3TD and ORG regions, numeric
Functional connectivity between F3OG and ORG regions, numeric
Functional connectivity between F3OD and ORG regions, numeric
Functional connectivity between FAG and ORD regions, numeric
Functional connectivity between FAD and ORD regions, numeric
Functional connectivity between F1G and ORD regions, numeric
Functional connectivity between F1D and ORD regions, numeric
Functional connectivity between F1OG and ORD regions, numeric
Functional connectivity between F1OD and ORD regions, numeric
Functional connectivity between F2G and ORD regions, numeric
Functional connectivity between F2D and ORD regions, numeric
Functional connectivity between F2OG and ORD regions, numeric
Functional connectivity between F2OD and ORD regions, numeric
Functional connectivity between F3OPG and ORD regions, numeric
Functional connectivity between F3OPD and ORD regions, numeric
Functional connectivity between F3TG and ORD regions, numeric
Functional connectivity between F3TD and ORD regions, numeric
Functional connectivity between F3OG and ORD regions, numeric
Functional connectivity between F3OD and ORD regions, numeric
Functional connectivity between ORG and ORD regions, numeric
Functional connectivity between FAG and SMAG regions, numeric
Functional connectivity between FAD and SMAG regions, numeric
Functional connectivity between F1G and SMAG regions, numeric
Functional connectivity between F1D and SMAG regions, numeric
Functional connectivity between F1OG and SMAG regions, numeric
Functional connectivity between F1OD and SMAG regions, numeric
Functional connectivity between F2G and SMAG regions, numeric
Functional connectivity between F2D and SMAG regions, numeric
Functional connectivity between F2OG and SMAG regions, numeric
Functional connectivity between F2OD and SMAG regions, numeric
Functional connectivity between F3OPG and SMAG regions, numeric
Functional connectivity between F3OPD and SMAG regions, numeric
Functional connectivity between F3TG and SMAG regions, numeric
Functional connectivity between F3TD and SMAG regions, numeric
Functional connectivity between F3OG and SMAG regions, numeric
Functional connectivity between F3OD and SMAG regions, numeric
Functional connectivity between ORG and SMAG regions, numeric
Functional connectivity between ORD and SMAG regions, numeric
Functional connectivity between FAG and SMAD regions, numeric
Functional connectivity between FAD and SMAD regions, numeric
Functional connectivity between F1G and SMAD regions, numeric
Functional connectivity between F1D and SMAD regions, numeric
Functional connectivity between F1OG and SMAD regions, numeric
Functional connectivity between F1OD and SMAD regions, numeric
Functional connectivity between F2G and SMAD regions, numeric
Functional connectivity between F2D and SMAD regions, numeric
Functional connectivity between F2OG and SMAD regions, numeric
Functional connectivity between F2OD and SMAD regions, numeric
Functional connectivity between F3OPG and SMAD regions, numeric
Functional connectivity between F3OPD and SMAD regions, numeric
Functional connectivity between F3TG and SMAD regions, numeric
Functional connectivity between F3TD and SMAD regions, numeric
Functional connectivity between F3OG and SMAD regions, numeric
Functional connectivity between F3OD and SMAD regions, numeric
Functional connectivity between ORG and SMAD regions, numeric
Functional connectivity between ORD and SMAD regions, numeric
Functional connectivity between SMAG and SMAD regions, numeric
Functional connectivity between FAG and COBG regions, numeric
Functional connectivity between FAD and COBG regions, numeric
Functional connectivity between F1G and COBG regions, numeric
Functional connectivity between F1D and COBG regions, numeric
Functional connectivity between F1OG and COBG regions, numeric
Functional connectivity between F1OD and COBG regions, numeric
Functional connectivity between F2G and COBG regions, numeric
Functional connectivity between F2D and COBG regions, numeric
Functional connectivity between F2OG and COBG regions, numeric
Functional connectivity between F2OD and COBG regions, numeric
Functional connectivity between F3OPG and COBG regions, numeric
Functional connectivity between F3OPD and COBG regions, numeric
Functional connectivity between F3TG and COBG regions, numeric
Functional connectivity between F3TD and COBG regions, numeric
Functional connectivity between F3OG and COBG regions, numeric
Functional connectivity between F3OD and COBG regions, numeric
Functional connectivity between ORG and COBG regions, numeric
Functional connectivity between ORD and COBG regions, numeric
Functional connectivity between SMAG and COBG regions, numeric
Functional connectivity between SMAD and COBG regions, numeric
Functional connectivity between FAG and COBD regions, numeric
Functional connectivity between FAD and COBD regions, numeric
Functional connectivity between F1G and COBD regions, numeric
Functional connectivity between F1D and COBD regions, numeric
Functional connectivity between F1OG and COBD regions, numeric
Functional connectivity between F1OD and COBD regions, numeric
Functional connectivity between F2G and COBD regions, numeric
Functional connectivity between F2D and COBD regions, numeric
Functional connectivity between F2OG and COBD regions, numeric
Functional connectivity between F2OD and COBD regions, numeric
Functional connectivity between F3OPG and COBD regions, numeric
Functional connectivity between F3OPD and COBD regions, numeric
Functional connectivity between F3TG and COBD regions, numeric
Functional connectivity between F3TD and COBD regions, numeric
Functional connectivity between F3OG and COBD regions, numeric
Functional connectivity between F3OD and COBD regions, numeric
Functional connectivity between ORG and COBD regions, numeric
Functional connectivity between ORD and COBD regions, numeric
Functional connectivity between SMAG and COBD regions, numeric
Functional connectivity between SMAD and COBD regions, numeric
Functional connectivity between COBG and COBD regions, numeric
Functional connectivity between FAG and FMG regions, numeric
Functional connectivity between FAD and FMG regions, numeric
Functional connectivity between F1G and FMG regions, numeric
Functional connectivity between F1D and FMG regions, numeric
Functional connectivity between F1OG and FMG regions, numeric
Functional connectivity between F1OD and FMG regions, numeric
Functional connectivity between F2G and FMG regions, numeric
Functional connectivity between F2D and FMG regions, numeric
Functional connectivity between F2OG and FMG regions, numeric
Functional connectivity between F2OD and FMG regions, numeric
Functional connectivity between F3OPG and FMG regions, numeric
Functional connectivity between F3OPD and FMG regions, numeric
Functional connectivity between F3TG and FMG regions, numeric
Functional connectivity between F3TD and FMG regions, numeric
Functional connectivity between F3OG and FMG regions, numeric
Functional connectivity between F3OD and FMG regions, numeric
Functional connectivity between ORG and FMG regions, numeric
Functional connectivity between ORD and FMG regions, numeric
Functional connectivity between SMAG and FMG regions, numeric
Functional connectivity between SMAD and FMG regions, numeric
Functional connectivity between COBG and FMG regions, numeric
Functional connectivity between COBD and FMG regions, numeric
Functional connectivity between FAG and FMD regions, numeric
Functional connectivity between FAD and FMD regions, numeric
Functional connectivity between F1G and FMD regions, numeric
Functional connectivity between F1D and FMD regions, numeric
Functional connectivity between F1OG and FMD regions, numeric
Functional connectivity between F1OD and FMD regions, numeric
Functional connectivity between F2G and FMD regions, numeric
Functional connectivity between F2D and FMD regions, numeric
Functional connectivity between F2OG and FMD regions, numeric
Functional connectivity between F2OD and FMD regions, numeric
Functional connectivity between F3OPG and FMD regions, numeric
Functional connectivity between F3OPD and FMD regions, numeric
Functional connectivity between F3TG and FMD regions, numeric
Functional connectivity between F3TD and FMD regions, numeric
Functional connectivity between F3OG and FMD regions, numeric
Functional connectivity between F3OD and FMD regions, numeric
Functional connectivity between ORG and FMD regions, numeric
Functional connectivity between ORD and FMD regions, numeric
Functional connectivity between SMAG and FMD regions, numeric
Functional connectivity between SMAD and FMD regions, numeric
Functional connectivity between COBG and FMD regions, numeric
Functional connectivity between COBD and FMD regions, numeric
Functional connectivity between FMG and FMD regions, numeric
Functional connectivity between FAG and FMOG regions, numeric
Functional connectivity between FAD and FMOG regions, numeric
Functional connectivity between F1G and FMOG regions, numeric
Functional connectivity between F1D and FMOG regions, numeric
Functional connectivity between F1OG and FMOG regions, numeric
Functional connectivity between F1OD and FMOG regions, numeric
Functional connectivity between F2G and FMOG regions, numeric
Functional connectivity between F2D and FMOG regions, numeric
Functional connectivity between F2OG and FMOG regions, numeric
Functional connectivity between F2OD and FMOG regions, numeric
Functional connectivity between F3OPG and FMOG regions, numeric
Functional connectivity between F3OPD and FMOG regions, numeric
Functional connectivity between F3TG and FMOG regions, numeric
Functional connectivity between F3TD and FMOG regions, numeric
Functional connectivity between F3OG and FMOG regions, numeric
Functional connectivity between F3OD and FMOG regions, numeric
Functional connectivity between ORG and FMOG regions, numeric
Functional connectivity between ORD and FMOG regions, numeric
Functional connectivity between SMAG and FMOG regions, numeric
Functional connectivity between SMAD and FMOG regions, numeric
Functional connectivity between COBG and FMOG regions, numeric
Functional connectivity between COBD and FMOG regions, numeric
Functional connectivity between FMG and FMOG regions, numeric
Functional connectivity between FMD and FMOG regions, numeric
Functional connectivity between FAG and FMOD regions, numeric
Functional connectivity between FAD and FMOD regions, numeric
Functional connectivity between F1G and FMOD regions, numeric
Functional connectivity between F1D and FMOD regions, numeric
Functional connectivity between F1OG and FMOD regions, numeric
Functional connectivity between F1OD and FMOD regions, numeric
Functional connectivity between F2G and FMOD regions, numeric
Functional connectivity between F2D and FMOD regions, numeric
Functional connectivity between F2OG and FMOD regions, numeric
Functional connectivity between F2OD and FMOD regions, numeric
Functional connectivity between F3OPG and FMOD regions, numeric
Functional connectivity between F3OPD and FMOD regions, numeric
Functional connectivity between F3TG and FMOD regions, numeric
Functional connectivity between F3TD and FMOD regions, numeric
Functional connectivity between F3OG and FMOD regions, numeric
Functional connectivity between F3OD and FMOD regions, numeric
Functional connectivity between ORG and FMOD regions, numeric
Functional connectivity between ORD and FMOD regions, numeric
Functional connectivity between SMAG and FMOD regions, numeric
Functional connectivity between SMAD and FMOD regions, numeric
Functional connectivity between COBG and FMOD regions, numeric
Functional connectivity between COBD and FMOD regions, numeric
Functional connectivity between FMG and FMOD regions, numeric
Functional connectivity between FMD and FMOD regions, numeric
Functional connectivity between FMOG and FMOD regions, numeric
Functional connectivity between FAG and GRG regions, numeric
Functional connectivity between FAD and GRG regions, numeric
Functional connectivity between F1G and GRG regions, numeric
Functional connectivity between F1D and GRG regions, numeric
Functional connectivity between F1OG and GRG regions, numeric
Functional connectivity between F1OD and GRG regions, numeric
Functional connectivity between F2G and GRG regions, numeric
Functional connectivity between F2D and GRG regions, numeric
Functional connectivity between F2OG and GRG regions, numeric
Functional connectivity between F2OD and GRG regions, numeric
Functional connectivity between F3OPG and GRG regions, numeric
Functional connectivity between F3OPD and GRG regions, numeric
Functional connectivity between F3TG and GRG regions, numeric
Functional connectivity between F3TD and GRG regions, numeric
Functional connectivity between F3OG and GRG regions, numeric
Functional connectivity between F3OD and GRG regions, numeric
Functional connectivity between ORG and GRG regions, numeric
Functional connectivity between ORD and GRG regions, numeric
Functional connectivity between SMAG and GRG regions, numeric
Functional connectivity between SMAD and GRG regions, numeric
Functional connectivity between COBG and GRG regions, numeric
Functional connectivity between COBD and GRG regions, numeric
Functional connectivity between FMG and GRG regions, numeric
Functional connectivity between FMD and GRG regions, numeric
Functional connectivity between FMOG and GRG regions, numeric
Functional connectivity between FMOD and GRG regions, numeric
Functional connectivity between FAG and GRD regions, numeric
Functional connectivity between FAD and GRD regions, numeric
Functional connectivity between F1G and GRD regions, numeric
Functional connectivity between F1D and GRD regions, numeric
Functional connectivity between F1OG and GRD regions, numeric
Functional connectivity between F1OD and GRD regions, numeric
Functional connectivity between F2G and GRD regions, numeric
Functional connectivity between F2D and GRD regions, numeric
Functional connectivity between F2OG and GRD regions, numeric
Functional connectivity between F2OD and GRD regions, numeric
Functional connectivity between F3OPG and GRD regions, numeric
Functional connectivity between F3OPD and GRD regions, numeric
Functional connectivity between F3TG and GRD regions, numeric
Functional connectivity between F3TD and GRD regions, numeric
Functional connectivity between F3OG and GRD regions, numeric
Functional connectivity between F3OD and GRD regions, numeric
Functional connectivity between ORG and GRD regions, numeric
Functional connectivity between ORD and GRD regions, numeric
Functional connectivity between SMAG and GRD regions, numeric
Functional connectivity between SMAD and GRD regions, numeric
Functional connectivity between COBG and GRD regions, numeric
Functional connectivity between COBD and GRD regions, numeric
Functional connectivity between FMG and GRD regions, numeric
Functional connectivity between FMD and GRD regions, numeric
Functional connectivity between FMOG and GRD regions, numeric
Functional connectivity between FMOD and GRD regions, numeric
Functional connectivity between GRG and GRD regions, numeric
Data was taken from the ADHD200 dataset and variables were manipulated in order to be different of the original data. Functional connectivity was measured as the Pearson correlation between the average fMRI signal from the regions of interest (ROI), i.e., 28 anatomical areas of the frontal lobe. Thus, a total of 378 pairwise connections are contained in the dataset.
https://fcon_1000.projects.nitrc.org/indi/adhd200/
This function computes the specified linear model (LM) for each edge in the network, and calculates the family wise error (FWE) p-value for the size of the clusters of connected edges that are individually below the P threshold (thrP), or above the T threshold (thrT). FWE estimation is based on the null distribution of the maximum size of sets of connected edges (defined as above), obtained with nperm permutations of the original data.
nbr_lm(net, nnodes, idata, mod, alternative = c("two.sided", "lower", "greater"), diag = FALSE, nperm, thrP = 0.05, thrT = NULL, cores = NULL, nudist = FALSE, expList = NULL, verbose = TRUE, ...)
nbr_lm(net, nnodes, idata, mod, alternative = c("two.sided", "lower", "greater"), diag = FALSE, nperm, thrP = 0.05, thrT = NULL, cores = NULL, nudist = FALSE, expList = NULL, verbose = TRUE, ...)
net |
3D volume (2D matrices for each observation) or 2D matrix of edges as columns. |
nnodes |
Number of network nodes. |
idata |
Matrix or data.frame including independent variables of interest of the model. |
mod |
Model, specify as a string, e.g., "~Group + Age". |
alternative |
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "lower". You can specify just the initial letter. |
diag |
Logical indicating if matrix diagonal is to be included in the analysis (default: FALSE). |
nperm |
Number of permutations. |
thrP |
Individual edge p-value threshold (if NULL, thrT should be given). |
thrT |
Individual edge T-value threshold (if NULL, thrP should be given). |
cores |
Number of selected cores for parallel computing (default: NULL). |
nudist |
Logical indicating if null distribution should be returned (default: FALSE). |
expList |
Character string adding variable names to the varlist of 'clusterExport' (default: NULL). |
verbose |
Logical indicating if messages should be printed (default: TRUE). |
... |
Additional arguments to be passed to the low level 'lm' function. |
It's VERY IMPORTANT when giving net as a 2D matrix or data.frame, to be completely sure that column distribution fits that of the upper triangle indices of an nnodes * nnodes matrix. This may be verified through the edge indices, e.g., "which(upper.tri(matrix(nrow = nnodes, ncol = nnodes)), arr.ind = T)" (see vignette NBR-LME for more details).
Regarding nperm, I suggest first setting it to small values (5 or 10) in order to test that everything runs fine. After that, set nperm to 1000 or larger number to decrease the margin of error of the FWE p-value (see https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Randomise/Theory#Conditional_Monte_Carlo_Permutation_Tests to explore the behavior of FWE p-value as a function of nperm).
List containing the observed statistics and their corresponding FWE p-values, if requested by nudist it will return the null distribution.
Observed statistics for every individual edge: corresponding subset of connected nodes and strength for each model term.
FWE for components: binary and strength sum, with their corresponding FWE p-value.
Null Distribution: maximal component size and strength for each permutation. Only returned if nudist is TRUE.
data(frontal2D) nbr_result <- nbr_lm(net = frontal2D[,-(1:3)], nnodes = 28, idata = frontal2D[,1:3], mod = "~ Group + Sex * Age", thrP = NULL, thrT = 4, nperm = 5) show(nbr_result)
data(frontal2D) nbr_result <- nbr_lm(net = frontal2D[,-(1:3)], nnodes = 28, idata = frontal2D[,1:3], mod = "~ Group + Sex * Age", thrP = NULL, thrT = 4, nperm = 5) show(nbr_result)
This function computes the specified linear model (LM) ANOVA for each edge in the network, and calculates the family wise error (FWE) p-value for the size of the clusters of connected edges that are individually below the P threshold (thrP), or above the F threshold (thrF). FWE estimation is based on the null distribution of the maximum size of sets of connected edges (defined as above), obtained with nperm permutations of the original data.
nbr_lm_aov(net, nnodes, idata, mod, diag = FALSE, nperm, thrP = 0.05, thrF = NULL, cores = NULL, nudist = FALSE, expList = NULL, verbose = TRUE, ...)
nbr_lm_aov(net, nnodes, idata, mod, diag = FALSE, nperm, thrP = 0.05, thrF = NULL, cores = NULL, nudist = FALSE, expList = NULL, verbose = TRUE, ...)
net |
3D volume (2D matrices for each observation) or 2D matrix of edges as columns. |
nnodes |
Number of network nodes. |
idata |
Matrix or data.frame including independent variables of interest of the model. |
mod |
Model, specify as a string, e.g., "~Group + Age". |
diag |
Logical indicating if matrix diagonal is to be included in the analysis (default: FALSE). |
nperm |
Number of permutations. |
thrP |
Individual edge p-value threshold (if NULL, thrF should be given). |
thrF |
Individual edge F-value threshold (if NULL, thrP should be given). |
cores |
Number of selected cores for parallel computing (default: NULL). |
nudist |
Logical indicating if null distribution should be returned (default: FALSE). |
expList |
Character string adding variable names to the varlist of 'clusterExport' (default: NULL). |
verbose |
Logical indicating if messages should be printed (default: TRUE). |
... |
Additional arguments to be passed to the low level 'lm' function. |
It's VERY IMPORTANT when giving net as a 2D matrix or data.frame, to be completely sure that column distribution fits that of the upper triangle indices of an nnodes * nnodes matrix. This may be verified through the edge indices, e.g., "which(upper.tri(matrix(nrow = nnodes, ncol = nnodes)), arr.ind = T)" (see vignette NBR-LME for more details).
Regarding nperm, I suggest first setting it to small values (5 or 10) in order to test that everything runs fine. After that, set nperm to 1000 or larger number to decrease the margin of error of the FWE p-value (see https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Randomise/Theory#Conditional_Monte_Carlo_Permutation_Tests to explore the behavior of FWE p-value as a function of nperm).
List containing the observed statistics and their corresponding FWE p-values, if requested by nudist it will return the null distribution.
Observed statistics for every individual edge: corresponding subset of connected nodes and strength for each model term.
FWE for components: binary and strength sum, with their corresponding FWE p-value.
Null Distribution: maximal component size and strength for each permutation. Only returned if nudist is TRUE.
data(frontal2D) ncores <- 2 library(parallel) if(detectCores() < ncores) ncores <- NULL nbr_result <- nbr_lm_aov(net = frontal2D[,-(1:3)], nnodes = 28, idata = frontal2D[,1:3], mod = "~ Group + Sex * Age", thrP = 0.01, nperm = 5, cores = ncores) show(nbr_result)
data(frontal2D) ncores <- 2 library(parallel) if(detectCores() < ncores) ncores <- NULL nbr_result <- nbr_lm_aov(net = frontal2D[,-(1:3)], nnodes = 28, idata = frontal2D[,1:3], mod = "~ Group + Sex * Age", thrP = 0.01, nperm = 5, cores = ncores) show(nbr_result)
This function computes the specified (non)linear mixed models (LME) for each edge in the network, and calculates the family wise error (FWE) p-value for the size of the clusters of connected edges that are individually below the P threshold (thrP), or above the T threshold (thrT). FWE estimation is based on the null distribution of the maximum size of sets of connected edges (defined as above), obtained with nperm permutations of the original data.
nbr_lme(net, nnodes, idata, mod, rdm, diag = FALSE, alternative = c("two.sided", "lower", "greater"), nperm, thrP = 0.05, thrT = NULL, cores = NULL, nudist = FALSE, expList = NULL, verbose = TRUE, ...)
nbr_lme(net, nnodes, idata, mod, rdm, diag = FALSE, alternative = c("two.sided", "lower", "greater"), nperm, thrP = 0.05, thrT = NULL, cores = NULL, nudist = FALSE, expList = NULL, verbose = TRUE, ...)
net |
3D volume (2D matrices for each observation) or 2D matrix of edges as columns. |
nnodes |
Number of network nodes. |
idata |
Matrix or data.frame including independent variables of interest of the model. |
mod |
Fixed effects, specify as a string, e.g., "~Session + Sex". |
rdm |
Random effects, specify as a string, e.g., "~1+Session|id". |
diag |
Logical indicating if matrix diagonal is to be included in the analysis (default: FALSE). |
alternative |
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "lower". You can specify just the initial letter. |
nperm |
Number of permutations. |
thrP |
Individual edge p-value threshold (if NULL, thrT should be given). |
thrT |
Individual edge T-value threshold (if NULL, thrP should be given). |
cores |
Number of selected cores for parallel computing (default: NULL). |
nudist |
Logical indicating if null distribution should be returned (default: FALSE). |
expList |
Character string adding variable names to the varlist of 'clusterExport' (default: NULL). |
verbose |
Logical indicating if messages should be printed (default: TRUE). |
... |
Additional arguments to be passed to the low level 'lm' function. |
It's VERY IMPORTANT when giving net as a 2D matrix or data.frame, to be completely sure that column distribution fits that of the upper triangle indices of an nnodes * nnodes matrix. This may be verified through the edge indices, e.g., "which(upper.tri(matrix(nrow = nnodes, ncol = nnodes)), arr.ind = T)" (see vignette NBR-LME for more details).
Regarding nperm, I suggest first setting it to small values (5 or 10) in order to test that everything runs fine. After that, set nperm to 1000 or larger number to decrease the margin of error of the FWE p-value (see https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Randomise/Theory#Conditional_Monte_Carlo_Permutation_Tests to explore the behavior of FWE p-value as a function of nperm).
List containing the observed statistics and their corresponding FWE p-values, if requested by nudist it will return the null distribution.
Observed statistics for every individual edge: corresponding subset of connected nodes and strength for each model term.
FWE for components: binary and strength sum, with their corresponding FWE p-value.
Null Distribution: maximal component size and strength for each permutation. Only returned if nudist is TRUE.
data(voles) nbr_result <- nbr_lme(net = voles[,-(1:3)], nnodes = 16, idata = voles[,1:3], mod = "~ Session*Sex", rdm = "~ 1+Session|id", nperm = 5, na.action = na.exclude ) show(nbr_result)
data(voles) nbr_result <- nbr_lme(net = voles[,-(1:3)], nnodes = 16, idata = voles[,1:3], mod = "~ Session*Sex", rdm = "~ 1+Session|id", nperm = 5, na.action = na.exclude ) show(nbr_result)
This function computes the specified (non)linear mixed models (LME) ANOVA for each edge in the network, and calculates the family wise error (FWE) p-value for the size of the clusters of connected edges that are individually below the P threshold (thrP), or above the F threshold (thrF). FWE estimation is based on the null distribution of the maximum size of sets of connected edges (defined as above), obtained with nperm permutations of the original data.
nbr_lme_aov(net, nnodes, idata, mod, rdm, diag = FALSE, nperm, thrP = 0.05, thrF = NULL, cores = NULL, nudist = FALSE, expList = NULL, verbose = TRUE, ...)
nbr_lme_aov(net, nnodes, idata, mod, rdm, diag = FALSE, nperm, thrP = 0.05, thrF = NULL, cores = NULL, nudist = FALSE, expList = NULL, verbose = TRUE, ...)
net |
3D volume (2D matrices for each observation) or 2D matrix of edges as columns. |
nnodes |
Number of network nodes. |
idata |
Matrix or data.frame including independent variables of interest of the model. |
mod |
Fixed effects, specify as a string, e.g., "~Session + Sex". |
rdm |
Random effects, specify as a string, e.g., "~1+Session|id". |
diag |
Logical indicating if matrix diagonal is to be included in the analysis (default: FALSE). |
nperm |
Number of permutations. |
thrP |
Individual edge p-value threshold (if NULL, thrF should be given). |
thrF |
Individual edge F-value threshold (if NULL, thrP should be given). |
cores |
Number of selected cores for parallel computing (default: NULL). |
nudist |
Logical indicating if null distribution should be returned (default: FALSE). |
expList |
Character string adding variable names to the varlist of 'clusterExport' (default: NULL). |
verbose |
Logical indicating if messages should be printed (default: TRUE). |
... |
Additional arguments to be passed to the low level 'lm' function. |
It's VERY IMPORTANT when giving net as a 2D matrix or data.frame, to be completely sure that column distribution fits that of the upper triangle indices of an nnodes * nnodes matrix. This may be verified through the edge indices, e.g., "which(upper.tri(matrix(nrow = nnodes, ncol = nnodes)), arr.ind = T)" (see vignette NBR-LME for more details).
Regarding nperm, I suggest first setting it to small values (5 or 10) in order to test that everything runs fine. After that, set nperm to 1000 or larger number to decrease the margin of error of the FWE p-value (see https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Randomise/Theory#Conditional_Monte_Carlo_Permutation_Tests to explore the behavior of FWE p-value as a function of nperm).
List containing the observed statistics and their corresponding FWE p-values, if requested by nudist it will return the null distribution.
Observed statistics for every individual edge: corresponding subset of connected nodes and strength for each model term.
FWE for components: binary and strength sum, with their corresponding FWE p-value.
Null Distribution: maximal component size and strength for each permutation. Only returned if nudist is TRUE.
data(voles) nbr_result <- nbr_lme_aov(net = voles[,-(1:3)], nnodes = 16, idata = voles[,1:3], mod = "~ Session*Sex", rdm = "~ 1+Session|id", nperm = 5, na.action = na.exclude ) show(nbr_result)
data(voles) nbr_result <- nbr_lme_aov(net = voles[,-(1:3)], nnodes = 16, idata = voles[,1:3], mod = "~ Session*Sex", rdm = "~ 1+Session|id", nperm = 5, na.action = na.exclude ) show(nbr_result)
A dataset containing the functional connectivity between 16 brain areas of 32 prairie voles in three different sessions.
voles
voles
A data.frame with 96 rows and 123 variables:
Subject ID, factor.
Factor: female (F) or male (M).
Factor: 1st, 2nd, or 3rd.
Functional connectivity between ACC and AON regions, numeric
Functional connectivity between ACC and BLA regions, numeric
Functional connectivity between AON and BLA regions, numeric
Functional connectivity between ACC and BNST regions, numeric
Functional connectivity between AON and BNST regions, numeric
Functional connectivity between BLA and BNST regions, numeric
Functional connectivity between ACC and LS regions, numeric
Functional connectivity between AON and LS regions, numeric
Functional connectivity between BLA and LS regions, numeric
Functional connectivity between BNST and LS regions, numeric
Functional connectivity between ACC and MeA regions, numeric
Functional connectivity between AON and MeA regions, numeric
Functional connectivity between BLA and MeA regions, numeric
Functional connectivity between BNST and MeA regions, numeric
Functional connectivity between LS and MeA regions, numeric
Functional connectivity between ACC and MOB regions, numeric
Functional connectivity between AON and MOB regions, numeric
Functional connectivity between BLA and MOB regions, numeric
Functional connectivity between BNST and MOB regions, numeric
Functional connectivity between LS and MOB regions, numeric
Functional connectivity between MeA and MOB regions, numeric
Functional connectivity between ACC and mPFC regions, numeric
Functional connectivity between AON and mPFC regions, numeric
Functional connectivity between BLA and mPFC regions, numeric
Functional connectivity between BNST and mPFC regions, numeric
Functional connectivity between LS and mPFC regions, numeric
Functional connectivity between MeA and mPFC regions, numeric
Functional connectivity between MOB and mPFC regions, numeric
Functional connectivity between ACC and NAcc regions, numeric
Functional connectivity between AON and NAcc regions, numeric
Functional connectivity between BLA and NAcc regions, numeric
Functional connectivity between BNST and NAcc regions, numeric
Functional connectivity between LS and NAcc regions, numeric
Functional connectivity between MeA and NAcc regions, numeric
Functional connectivity between MOB and NAcc regions, numeric
Functional connectivity between mPFC and NAcc regions, numeric
Functional connectivity between ACC and PVN regions, numeric
Functional connectivity between AON and PVN regions, numeric
Functional connectivity between BLA and PVN regions, numeric
Functional connectivity between BNST and PVN regions, numeric
Functional connectivity between LS and PVN regions, numeric
Functional connectivity between MeA and PVN regions, numeric
Functional connectivity between MOB and PVN regions, numeric
Functional connectivity between mPFC and PVN regions, numeric
Functional connectivity between NAcc and PVN regions, numeric
Functional connectivity between ACC and RSC regions, numeric
Functional connectivity between AON and RSC regions, numeric
Functional connectivity between BLA and RSC regions, numeric
Functional connectivity between BNST and RSC regions, numeric
Functional connectivity between LS and RSC regions, numeric
Functional connectivity between MeA and RSC regions, numeric
Functional connectivity between MOB and RSC regions, numeric
Functional connectivity between mPFC and RSC regions, numeric
Functional connectivity between NAcc and RSC regions, numeric
Functional connectivity between PVN and RSC regions, numeric
Functional connectivity between ACC and VP regions, numeric
Functional connectivity between AON and VP regions, numeric
Functional connectivity between BLA and VP regions, numeric
Functional connectivity between BNST and VP regions, numeric
Functional connectivity between LS and VP regions, numeric
Functional connectivity between MeA and VP regions, numeric
Functional connectivity between MOB and VP regions, numeric
Functional connectivity between mPFC and VP regions, numeric
Functional connectivity between NAcc and VP regions, numeric
Functional connectivity between PVN and VP regions, numeric
Functional connectivity between RSC and VP regions, numeric
Functional connectivity between ACC and VTA regions, numeric
Functional connectivity between AON and VTA regions, numeric
Functional connectivity between BLA and VTA regions, numeric
Functional connectivity between BNST and VTA regions, numeric
Functional connectivity between LS and VTA regions, numeric
Functional connectivity between MeA and VTA regions, numeric
Functional connectivity between MOB and VTA regions, numeric
Functional connectivity between mPFC and VTA regions, numeric
Functional connectivity between NAcc and VTA regions, numeric
Functional connectivity between PVN and VTA regions, numeric
Functional connectivity between RSC and VTA regions, numeric
Functional connectivity between VP and VTA regions, numeric
Functional connectivity between ACC and Dent regions, numeric
Functional connectivity between AON and Dent regions, numeric
Functional connectivity between BLA and Dent regions, numeric
Functional connectivity between BNST and Dent regions, numeric
Functional connectivity between LS and Dent regions, numeric
Functional connectivity between MeA and Dent regions, numeric
Functional connectivity between MOB and Dent regions, numeric
Functional connectivity between mPFC and Dent regions, numeric
Functional connectivity between NAcc and Dent regions, numeric
Functional connectivity between PVN and Dent regions, numeric
Functional connectivity between RSC and Dent regions, numeric
Functional connectivity between VP and Dent regions, numeric
Functional connectivity between VTA and Dent regions, numeric
Functional connectivity between ACC and HipD regions, numeric
Functional connectivity between AON and HipD regions, numeric
Functional connectivity between BLA and HipD regions, numeric
Functional connectivity between BNST and HipD regions, numeric
Functional connectivity between LS and HipD regions, numeric
Functional connectivity between MeA and HipD regions, numeric
Functional connectivity between MOB and HipD regions, numeric
Functional connectivity between mPFC and HipD regions, numeric
Functional connectivity between NAcc and HipD regions, numeric
Functional connectivity between PVN and HipD regions, numeric
Functional connectivity between RSC and HipD regions, numeric
Functional connectivity between VP and HipD regions, numeric
Functional connectivity between VTA and HipD regions, numeric
Functional connectivity between Dent and HipD regions, numeric
Functional connectivity between ACC and HipV regions, numeric
Functional connectivity between AON and HipV regions, numeric
Functional connectivity between BLA and HipV regions, numeric
Functional connectivity between BNST and HipV regions, numeric
Functional connectivity between LS and HipV regions, numeric
Functional connectivity between MeA and HipV regions, numeric
Functional connectivity between MOB and HipV regions, numeric
Functional connectivity between mPFC and HipV regions, numeric
Functional connectivity between NAcc and HipV regions, numeric
Functional connectivity between PVN and HipV regions, numeric
Functional connectivity between RSC and HipV regions, numeric
Functional connectivity between VP and HipV regions, numeric
Functional connectivity between VTA and HipV regions, numeric
Functional connectivity between Dent and HipV regions, numeric
Functional connectivity between HipD and HipV regions, numeric
Data is based on an experiment of social bonding in prairie voles. Functional connectivity was measured as the Pearson correlation between the average fMRI signal from the regions of interest (ROI) within 16 anatomical areas of brain. Then, a total of 120 pairwise connections are contained in the dataset. NOTE: This is not the original data of the study!
https://www.biorxiv.org/content/10.1101/752345v2