Learn R Programming

expectreg (version 0.53)

enorm: Expectiles of distributions

Description

Much like the 0.5 quantile of a distribution is the median, the 0.5 expectile is the mean / expected value. These functions add the possibility of calculating expectiles of known distributions. The functions starting with 'e' calculate an expectile value for given asymmetry values, the functions starting with 'pe' calculate vice versa.

Usage

enorm(asy, m = 0, sd = 1)
penorm(e, m = 0, sd = 1)

ebeta(asy, a = 1, b = 1) pebeta(e, a = 1, b = 1)

eunif(asy, min = 0, max = 1) peunif(e, min = 0, max = 1)

et(asy, df) pet(e, df)

elnorm(asy, meanlog = 0, sdlog = 1) pelnorm(e, meanlog = 0, sdlog = 1)

egamma(asy, shape, rate = 1, scale = 1/rate) pegamma(e, shape, rate = 1, scale = 1/rate)

eexp(asy, rate = 1) peexp(e, rate = 1)

echisq(asy, df) pechisq(e, df)

Value

Vector of the expectiles or asymmetry values for the desired distribution.

Arguments

asy

vector of asymmetries with values between 0 and 1.

e

vector of expectiles from the respective distribution.

m, sd

mean and standard deviation of the Normal distribution.

a, b

positive parameters of the Beta distribution.

min, max

minimum, maximum of the uniform distribution.

df

degrees of freedom of the student t and chi squared distribution.

meanlog, sdlog

parameters of the lognormal distribution.

shape, rate, scale

parameters of the gamma distribution (with 2 different parametrizations) and parameter of the exponential distribution which is a special case of the gamma with shape=1.

Author

Fabian Otto- Sobotka
Carl von Ossietzky University Oldenburg
https://uol.de

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

Details

An expectile of a distribution cannot be determined explicitely, but instead is given by an equation. The expectile z for an asymmetry p is: \( p = \frac{G(z) - z F(z)}{2(G(z) - z F(z)) + z - m}\) where m is the mean, F the cdf and G the partial moment function \( G(z) = \int\limits_{-\infty}^{z} uf(u) \mbox{d}u \).

References

Newey W and Powell J (1987) Asymmetric least squares estimation and testing Econometrica, 55:819-847

See Also

eemq

Examples

Run this code
x <- seq(0.02,0.98,0.2)

e = enorm(x)
e
penorm(e)

Run the code above in your browser using DataLab