PGPD.1: Estimation of the p-value using Pareto's distribution...

Description Usage Arguments Value Author(s) References Examples

Description

Estimates the p-value of a data set y for a test statistic x0 with the Pareto's distribution function.

Usage

1
PGPD.1(x0,zexc,Nperm,seuil,estim)

Arguments

x0

Test statistic of the data set - real number

zexc

Data set which results from the initial one y - sorted list of real numbers

Nperm

Number of permutations - integer

seuil

Threshold used to create the data set zexc composed of the values of y higher or equal to (x0 - seuil) - real number

estim

Method to estimate the parameters of Pareto's function - String: either "EMV" for the method of maximum likelihood or "PWM" for the method of probability weighted moments

Value

Returns a list composed of:

p

The value of the estimated p-value. - real number

k

The estimated parameter k of Pareto's cumulative distribution function if it was used to compute the p-value - real number

a

The estimated parameter a of Pareto's cumulative distribution function if it was used to compute the p-value - real number

Author(s)

Marion

References

Theo A. Knijnenburg, Lodewyk F. A. Wessels, Marcel J. T. Reinders and Ilya Shmulevich, Fewer permutations, more accurate P-values, Bioinformatics.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
PGPD.1(3,tail(sort(rnorm(1e6)),500),1e6,2,"PWM")

## The function is currently defined as
function (x0,zexc,Nperm,seuil,estim)
{
  M<-nb_exc(x0-seuil,zexc)

  if(M >= 10)
    return(list( p = M/Nperm,
                 k = NA,
                 a = NA ))
  else {
    result<-FGPD(x0-seuil,zexc,estim)
    return(list( p = length(zexc)/Nperm*(1-result$val),
                 k = result$k,
                 a = result$a ))
    }
}

genostats/tail.modeling documentation built on May 12, 2019, 7:42 a.m.