permuco4brain
provides functions to compute permutation test in brain imagery data. It is designed for M-EEG/ERP data. permuco4brain
is an add-on to permuco
to computing cluster-mass tests, the “threshold-free clusters-enhancement” and the Troendle’s procedure for tests distribution in space and time (e.g.: full-scalp EEG data).
permuco4brain
currently works jointly with permuco
1.1.1 (github). Download it using:
devtools::install_github("jaromilfrossard/permuco", build_vignettes = TRUE)
permuco4brain
is still under development and you can expect changes. Make sure to install permuco4brain
with its full documentation:
devtools::install_github("jaromilfrossard/permuco4brain", build_vignettes = TRUE)
The main function of permuco4brain
is brainperm()
and it needs:
formula
: a formula object defining the design (right side) and a 3D array containing the signals (left side). The signal is a 3D array visible in the global environment. Its dimension is the design X samples X channels. Each “rows” of the 3D array should be related to the corresponding row of the design (data
argument).data
: a dataframe containing the variables of the design.graph
: an igraph
object defining spatial adjacency of the channels (third dimension of the signal). The names of the vertices should correspond to the names of the 3rd dimension of signal.By default, the brainperm()
function produces the cluster-mass test, but you can choose the TFCE with the argument multcomp = "tfce"
or the Troendle’s procedure multcomp = "troendle"
.
permuco4brain
uses the future
package to handle multi-cores computing.
You can inspect result using the summary()
method and visualize them using image()
.
Visit https://jaromilfrossard.github.io/permuco4brain or check the vignette:
permuco4brain
in combination with eeguana
:
vignette("permuco4brain-with-eeguana", package = "permuco4brain")
You will find information how to extract the 3D array, the design data-frame and the graph from an eeg_lst
object of the eeguana
package. Check the eeguana
package for pre-processing EEG data within R
(https://github.com/bnicenboim/eeguana).
permuco4brain
with signals stored in edf
files:
vignette("download-example-cheval", package = "permuco4brain")
In this tutorial, you learn how to download EEG data from zenodo
and analyze them using permuco4brain
.
permuco4brain
and future
to run the TFCE:
vignette("tfce", package = "permuco4brain")
ggplot2
to produce graphical representation of the results for publication:
vignette("figure-ggplot2", package = "permuco4brain")
In this tutorial, you find 3 different types of plot that present the results of a cluster-mass test or TFCE. All of them use the ggplot2
package and may easily be customized for publication.