# Network-based statistic for brain MRI data

### Description

Calculates the *network-based statistic (NBS)*, which allows for
family-wise error (FWE) control over network data, introduced for brain MRI
data by Zalesky et al. Accepts a three-dimensional array of all subjects'
connectivity matrices and a `data.table`

of covariates, and creates a
null distribution of the largest connected component size by permuting
subjects across groups. The covariates `data.table`

must have (at least)
a *Group* column.

### Usage

1 2 |

### Arguments

`A` |
Three-dimensional array of all subjects' connectivity matrices |

`covars` |
A |

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

`p.init` |
Numeric; the initial p-value threshold (default: 0.001) |

`N` |
Integer; the number of permutations (default: 1e3) |

`symmetric` |
Logical indicating if input matrices are symmetric (default: FALSE) |

### Details

The graph that is returned by this function will have a `t.stat`

edge
attribute which is the t-statistic for that particular connection, along with
a `p`

edge attribute, which is the p-value for that connection.
Additionally, each vertex will have a `p.nbs`

attribute representing
*1 - * the p-value associated with that vertex's component.

### Value

A list containing:

`g.nbs` |
The |

`obs` |
Integer vector of the observed connected component sizes |

`perm` |
Integer vector of the permutation distribution of largest connected component sizes |

`p.perm` |
Numeric vector of the permutation p-values for each component |

`p.init` |
Numeric; the initial p-value threshold used |

### Author(s)

Christopher G. Watson, cgwatson@bu.edu

### References

Zalesky A., Fornito A., Bullmore E.T. (2010) *Network-based
statistic: identifying differences in brain networks*. NeuroImage,
53(4):1197-1207.

### Examples

1 2 3 4 | ```
## Not run:
max.comp.nbs <- NBS(A.norm.sub[[1]], covars.dti, N=5e3)
## End(Not run)
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.