LessPermutation: Reduce permutation times

View source: R/LessPermutation.R

LessPermutationR Documentation

Reduce permutation times

Description

Reduce permutation times by fitting generalized pareto distribution of the right tail data.

Usage

LessPermutation(
  X,
  x0,
  fitting.method = "mle",
  search.step = 0.01,
  fit.cutoff = 0.05,
  when.to.fit = 0.05
)

Arguments

X

a vector of data recording the permutation values

x0

observed value

fitting.method

method to fit GPD, default is "mle", alternative "gd"(gradient descend)

search.step

the length of step (this param * length(X)) to find threshold. Default 0.01

fit.cutoff

the cutoff of p value to judge whether it fits well to GPD, default is 0.05

when.to.fit

a cutoff to tell how many sample values are bigger than the target value then we don't need to fit GPD. it is a portion.Default 0.05

Value

p value of the observed value in the permutation test

Examples

x = POT::rgpd(200, 1, 2, 0.25)
LessPermutation(x,1,fitting.method='gd')

likelet/lassoBag documentation built on July 19, 2023, 10:36 a.m.