pLandau: The Landau Distribution

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Density, distribution function, quantile function and random number generation for the Landau distribution with location parameter mu and scale parameter sigma.

Usage

1
2
3
4
dLandau(x, mu=log(pi/2), sigma=pi/2, log=FALSE)
pLandau(x, mu=log(pi/2), sigma=pi/2, log=FALSE, lower.tail=TRUE)
qLandau(p, mu=log(pi/2), sigma=pi/2, log=FALSE, lower.tail=TRUE)
rLandau(n, mu=log(pi/2), sigma=pi/2)

Arguments

x

The value or vector of values of the Landau-distributed random variable.

mu

The location parameter of the Landau distribution. Defaults to log(pi/2) to give Landau's original distribution.

sigma

The scale parameter of the Landau distribution. Defaults to pi/2 to give Landau's original distribution.

log

If true the log probability is output.

lower.tail

If true (the default) the lower tail probability is returned. Otherwise the upper tail probability.

p

The value or vector of values, between 0 and 1, of the probability specifying the quantile for which to return the Landau random variable x.

n

The number of values to simulate.

Details

The density of the Landau distribution can be written

f(x)=\frac{1}{π\,σ}\int_0^∞ \exp≤ft(-t\frac{(x-μ)}{σ}-\frac{2}{π}t\log(t)\right)\,\sin≤ft(2t\right)\textrm{d}t

Value

dLandau produces the density, pLandau the tail probability, qLandau the quantile and rLandau random variates for the Landau distribution.

Author(s)

Daniel J. Wilson

References

Landau LD (1944) On the energy loss of fast particles by ionization. J Phys USSR 8:201-205.

Daniel J. Wilson (2019) The harmonic mean p-value for combining dependent tests. Proceedings of the National Academy of Sciences USA 116: 1195-1200.

See Also

p.hmp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# For detailed examples type vignette("harmonicmeanp")
# Example: simulate from a non-uniform distribution mildly enriched for small \emph{p}-values. 
# Compare the significance of the combined p-value for Bonferroni, Benjamini-Hochberg (i.e. Simes), 
# HMP and (equivalently) MAMML with 2 degrees of freedom.
L = 1000
p = rbeta(L,1/1.5,1)
min(p.adjust(p,"bonferroni"))
min(p.adjust(p,"BH"))
x = hmp.stat(p)
pLandau(1/x,log(length(p))+(1 + digamma(1) - log(2/pi)),pi/2,lower.tail=FALSE)
p.hmp(p,L=L)
p.mamml(1/p,2,L=L)

Example output

Loading required package: FMStable
[1] 0.002315365
[1] 0.002315365
   hmp.stat 
0.001661439 
      p.hmp 
0.001661439 
    p.mamml 
0.001661439 

harmonicmeanp documentation built on Aug. 20, 2019, 1:04 a.m.