lin {modehunt}R Documentation

Perturbed Uniform Distribution

Description

Density function, distribution function, quantile function and random generation for the perturbed uniform distribution having a linear increase of slope ss on an interval [a,b][0,1][a,b] \in [0,1].

Usage

dlin(x, a, b, s) 
plin(q, a, b, s) 
qlin(p, a, b, s)
rlin(n, a, b, s)

Arguments

x, q

Vector of quantiles.

p

Vector of probabilities.

n

Number of observations.

a

Left interval endpoint, real number in [0,1)[0,1).

b

Right interval endpoint, real number in (0,1](0,1].

s

Slope parameter, real number such that s2/(ba)|s| \le 2/(b-a).

Details

The what we call perturbed uniform distribution (PUD) with perturbation on an interval [a,b][0,1][a,b] \in [0,1] with slope parameter ss such that s2/(ba)|s| \le 2 / (b-a) has density function

fa,b,s(x)=(sxsa+b2)1{x[a,b)}+1{[0,a)[b,1]},f_{a, b, s}(x) = \Bigl(sx-s\frac{a+b}{2}\Bigr)1\{x \in [a,b)\} + 1\{[0,a) \cup [b,1]\},

distribution function

Fa,b,s(q)=(q+s2(q2a2+(ax)(a+b)))1{q[a,b)}+q{[0,a)[b,1]},F_{a, b, s}(q) = \Bigl(q+\frac{s}{2}(q^2-a^2+(a-x)(a+b)) \Bigr)1\{q \in [a,b)\} + q\{[0,a) \cup [b,1]\},

and quantile function

Fa,b,s1(p)=(s1+a+b2+s(ab)2+4s(1s(a+b)+2p)2s) 1{p[a,b)}+p{[0,a)[b,1]}.F_{a, b, s}^{-1}(p) = \Bigl(-s^{-1}+\frac{a+b}{2}+\frac{s \sqrt{(a-b)^2+\frac{4}{s}(\frac{1}{s}-(a+b)+2p)}}{2|s|} \Bigr) \ 1\{p \in [a,b)\} + p\{[0,a) \cup [b,1]\}.

This function was used to carry out the simulations to compute the power curves given in Rufibach and Walther (2010).

Value

dlin gives the values of the density function, plin those of the distribution function, and qlin those of the quantile function of the PUD at x,q,x, q, and pp, respectively. rlin generates nn random numbers, returned as an ordered vector.

Author(s)

Kaspar Rufibach, kaspar.rufibach@gmail.com,
http://www.kasparrufibach.ch

Guenther Walther, gwalther@stanford.edu,
www-stat.stanford.edu/~gwalther

References

Rufibach, K. and Walther, G. (2010). A general criterion for multiscale inference. J. Comput. Graph. Statist., 19, 175–190.


[Package modehunt version 1.0.7 Index]