plotNullDistribution: Plot permutation p-values distribution

Description Usage Arguments Value Author(s) Examples

View source: R/plotNullDistribution.R

Description

Create a plot of permutation pvalues with corresponding specified critical vectors.

Usage

1
2
3
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)

Arguments

P

matrix of pvalues with dimensions m \times B used instead of the data matrix X. Default to @NULL.

family

string character. Choose a family of confidence envelopes to compute the critical vector. from "simes", "aorc", "beta" and "higher.criticism". If more than one critical vector are considered, it must be a vector. Default "simes".

alpha

numeric value in '[0,1]'. It expresses the alpha level to control the family-wise error rate. Default 0.1.

path

character string. Path to save the plot. The path does not must end with /. Default to getwd().

name

character string. The name of file that will be used to save the plot. Default to name.

delta

numeric value. It expresses the delta value, please see the references. Default to 0. If more than one critical vector are considered, delta must be a vector having length equals to the length of critical vectors specified in family.

copes

list of NIfTI file if P = NULL. The list of copes, i.e., constrasts maps, one for each subject used to compute the statistical tests.

mask

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 non of the voxels have to be excluded.

alternative

character string. It refers to the alternative hypothesis, must be one of "two.sided" (default), "greater" or "lower".

rand

Boolean value. Default @FALSE. If rand = TRUE, the p-values are computed by rowRanks.

B

numeric value. Number of permutations, default to 1000.

Value

Save a plot in path with name specified in name describing the p-values null distribution with critical value curve and observed pvalues in red.

Author(s)

Angela Andreella

Examples

1
2
3
4
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)

angeella/ARIpermutation documentation built on Nov. 25, 2021, 9:23 a.m.