Compute permutation test with with multiples comparison procedure (cluster-mass, TFCE or Troendle).
brainperm( formula, data, graph, np = 5000, method = NULL, type = "permutation", test = "fisher", aggr_FUN = NULL, threshold = NULL, multcomp = "clustermass", effect = NULL, ... )
formula | A formula defining the design of the model. The left part should be a 3 dimensional array. Its rows are the observations (or design), its column are the samples (or time-point) and the third dimension are the space (or the nodes of the graph). Each row should correspond to the design in the |
---|---|
data | A dataframe containing the design. |
graph | An |
np | A scalar indicating the number of permutations. It will be overwrite if |
method | A character string to specify the re-sampling method. See |
type | A character string to specify the type of re-sampling transformation. Default is |
test | A character string to specify the name of the test. Default is |
aggr_FUN | A function used as mass function. It should aggregate the statistics of a cluster into one scalar. Default is the sum of squares for t statistic and sum for F statistic. |
threshold | See |
multcomp | The multiple comparison procedure only |
effect | An integer indicating the effect to test. It refers to the |
... | further arguments |
a brainperm
object.
The random effects model is only available with a F statistic.
Other arguments could be pass in ...
:
P
: A matrix containing the permutation of class matrix
or Pmat
; which is used for the reproducibility of the results. The first column must be the identity. P
overwrites np
argument.
return_distribution = FALSE
: return the permutation distribution of the statistics. Warnings : return one high dimensional matrices (number of test times number of permutation) for each test.
coding_sum = TRUE
: a logical defining the coding of the design matrix to contr.sum
: set by default to TRUE
for ANOVA (when the argument test
is "fisher"
) to tests main effects and is set to FALSE
when test
is "t"
. If coding_sum
is set to FALSE
the design matrix is computed with the coding defined in the dataframe and the tests of simple effects are possible with a coding of the dataframe set to contr.treatment
.
E = 0.5
: a numeric for extend parameter of the TFCE.
H
: a numeric for height parameter of the TFCE. When test = "t"
, the default is H = 2
and when test = "fisher"
, the default is H = 1
.
ndh = 500
: an integer defining the number of steps when estimating the integral of the TFCE.