# lin: Perturbed Uniform Distribution In modehunt: Multiscale Analysis for Density Functions

## Description

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

## Usage

 1 2 3 4 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). b Right interval endpoint, real number in (0,1]. s Slope parameter, real number such that |s| ≤ 2/(b-a).

## Details

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

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

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

F_{a, b, s}^{-1}(p) = \Bigl(-s^{-1}+\frac{a+b}{2}+\frac{s √{(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, and p, respectively. rlin generates n 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.

modehunt documentation built on May 2, 2019, 3:31 a.m.