pemq: The "expectiles-meet-quantiles" distribution family.

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

Description

Density, distribution function, quantile function, random generation, expectile function and expectile distribution function for a family of distributions for which expectiles and quantiles coincide.

Usage

1
2
3
4
5
6
pemq(z,ncp=0,s=1)
demq(z,ncp=0,s=1)
qemq(q,ncp=0,s=1)
remq(n,ncp=0,s=1)
eemq(asy,ncp=0,s=1)
peemq(e,ncp=0,s=1)

Arguments

ncp

non centrality parameter and mean of the distribution.

s

scaling parameter, has to be positive.

z, e

vector of quantiles / expectiles.

q, asy

vector of asymmetries / probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

Details

This distribution has the cumulative distribution function: F(x;ncp,s) = \frac{1}{2}(1 + sgn(\frac{x-ncp}{s}) √{1 - \frac{2}{2 + (\frac{x-ncp}{s})^2}})

and the density: f(x;ncp,s) = \frac{1}{s}( \frac{1}{2 + (\frac{x-ncp}{s})^2} )^\frac{3}{2}

It has infinite variance, still can be scaled by the parameter s. It has mean ncp. In the canonical parameters it is equal to a students-t distribution with 2 degrees of freedom. For s = √{2} it is equal to a distribution introduced by Koenker(2005).

Value

demq gives the density, pemq and peemq give the distribution function, qemq gives the quantile function, eemq computes the expectiles numerically and is only provided for completeness, since the quantiles = expectiles can be determined analytically using qemq, and remq generates random deviates.

Author(s)

Fabian Otto- Sobotka
Carl von Ossietzky University Oldenburg
http://www.uni-Oldenburg.de

Thomas Kneib
Georg August University Goettingen
http://www.uni-goettingen.de

References

Koenker R (2005) Quantile Regression Cambridge University Press, New York

See Also

enorm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
x <- seq(-5,5,length=100)
plot(x,demq(x))
plot(x,pemq(x,ncp=1))

z <- remq(100,s=sqrt(2))
plot(z)

y <- seq(0.02,0.98,0.2)
qemq(y)
eemq(y)

pemq(x) - peemq(x)

expectreg documentation built on Aug. 24, 2019, 1:05 a.m.