GBJ_pvalue: GBJ_pvalue.R

Description Usage Arguments Value Examples

View source: R/GBJ_pvalue.R

Description

Calculate the p-value for the Generalized Berk-Jones (GBJ) statistic.

Usage

1
GBJ_pvalue(observed_gbj, d, pairwise_cors, times_to_try = 5)

Arguments

observed_gbj

The observed value of the GBJ statistic.

d

The number of test statistics in the set.

pairwise_cors

A vector of all d(d-1)/2 pairwise correlations between the test statistics, where d is total number of test statistics in the set.

times_to_try

Sometimes the numerical root-finder is finnicky, so we have to give it extra chances to try and calculate the p-value if first time is failure. Recommend setting this parameter to 5.

Value

The p-value of the GBJ test.

Examples

1
GBJ_pvalue(observed_gbj=2, d=5, pairwise_cors=rep(0.2,10))

GBJ documentation built on March 26, 2020, 6:05 p.m.