global_p {TOHM} | R Documentation |
Compute global p-values
Description
It computes the global p-value for a given value of the test statistic.
Usage
global_p(c, ck, type = c("Gaussian", "Chi^2", "Chi-bar^2"),
k = NULL, k_vec = NULL, weights = NULL, ECdensities = NULL, ECs)
Arguments
c |
Observed value of the test statistic. |
ck |
Vector of thresholds defining the excursions sets with respect to which the ECs are computed. |
type |
Type of random field. The possible options are |
k |
If |
k_vec |
If |
weights |
If |
ECdensities |
See datails. |
ECs |
A vector or matrix containing the Euler characteristics (ECs) computed over a Monte Carlo simulation of the random field under the null model. Each colum correspond to the ECs obtained for each of the thresholds in |
Details
If type="Chi-bar^2"
the degrees of freedom of the Chi-square random fields involved in the mixture, as well as the respective weights, have to be spefcified in the arguments k_vec
and weights
.
If the distribution of the random field is not available in type
, the user can specify in ECdensities
a function taking c
as argument and returning
the vector of the desired EC densities to be evaluated at c
. Notice that the length of the vector returned by the function specified in ECdensities
must corresponds to one plus the dimension of the search area (since the first value should correspond to the EC density of order zero (see ECden_vec
)).
Value
global_p |
Global p-value. |
MCerror |
Monte Carlo error associated to the global p-vaue. |
Author(s)
Sara Algeri
References
S. Algeri and D.A. van Dyk. Testing one hypothesis multiple times: The multidimensional case. arXiv:1803.03858, submitted to the Journal of Computational and Graphical Statistics, 2018.
See Also
Examples
ck<-c(1,2)
ECs<-cbind(rpois(100,1.5),rpois(100,1))
global_p(c=12,ck=ck,type="Gaussian",ECs=ECs)