Create a plot of permutation-based \(p\)-values with corresponding specified critical vectors.
plotNullDistribution(P=NULL,family="simes",alpha = 0.05,
path = getwd(), name = "plot", delta = 0,
copes=NULL,mask=NULL, alternative = "two.sided", rand = FALSE, B = 1000)Save a plot in path with name specified in name describing the \(p\)-values null distribution with critical value curve and observed \(p\)-values in red.
Matrix of \(p\)-values with dimensions \(m \times B\) where \(m\) is the number of variables
and \(B\) the number of permutations used instead of the data matrix X. Default to NULL.
String character. Name of the family confidence envelope to compute the critical vector
from "simes", "aorc", "beta", "higher.criticism", and "power".
Default to "simes". If more than one critical vector are considered, it must be a vector.
Numeric value in `[0,1]`. \(\alpha\) level to control the family-wise error rate. Default to 0.05.
Character string. Path to save the plot. The path does not must end with /. Default to getwd().
Character string. The name of file that will be used to save the plot. Default to "plot".
Numeric value. \(\delta\) value. Please see the reference below. Default to 0.
If more than one critical vector are considered, delta must be a vector having length equals to the length of the vector specified in family.
List of NIfTI file. The list of copes, i.e., contrasts maps, one for each subject used to compute the statistical tests.
NIfTI file or character string. 3D array of logical values (i.e. TRUE/FALSE in/out of the brain).
Alternatively it may be a (character) NIfTI file name. If mask=NULL, it is assumed that none of the voxels have to be excluded.
Character string. It refers to the alternative hypothesis, must be one of "two.sided" (default), "greater" or "lower".
Boolean value. Default to FALSE. If rand = TRUE, the \(p\)-values are computed by rowRanks.
Numeric value. Number of permutations, default to 1000.
Angela Andreella
Andreella, A., Hemerik, J., Finos, L., Weeda, W., & Goeman, J. (2023). Permutation-based true discovery proportions for functional magnetic resonance imaging cluster analysis. Statistics in Medicine, 42(14), 2311-2340.
if (FALSE) {
db <- simulateData(pi0 = 0.8, m = 100, n = 20, rho = 0)
out <- signTest(X = db)
pv <- cbind(out$pv, out$pv_H0)
plotNullDistribution(P = pv)
}
Run the code above in your browser using DataLab