expectile: Expectiles

Description Usage Arguments Value References Examples

Description

Expectiles, introduced by Newey and Powell (1987), are analogs of the quantiles which minimize an asymmetric quadratic objective function rather than the asymmetric linear objective function which defines the quantiles.

Usage

1
expectile(x, probs = seq(0, 1, len = 5), hd = T)

Arguments

x

a vector

probs

the expectiles desired

hd

if TRUE (the default) the Harrell-Davis method is used to refine the expectiles by passing the expectile estimates to the empirical cumulative density function for the data to obtain the equivalent quantile probabilities, then utilizing the hdquantile function. See the example for more information.

Value

a named numeric vector

References

Newey, W., & Powell, J. (1987). Asymmetric Least Squares Estimation and Testing.

Examples

1
2
3
4
5
6
7
## To understand how the Harrell-Davis method is used to refine the expectiles, first get the raw expectiles.
ex<-expectile(iris$Sepal.Length,hd=F)
## Plug these estimates into the ecdf to obtain the quantile probabilites.
q<-ecdf(iris$Sepal.Length)(ex)
## Pass the quantiles to the hdquantile function. These quantiles correspond to the expectiles.
hdquantile(iris$Sepal.Legth)
## However,you can just use expectile(iris$Sepal.Length), as the hd adjustment is enabled by default.

abnormally-distributed/cvreg documentation built on May 3, 2020, 3:45 p.m.