Learn R Programming

expectreg (version 0.53)

expectile: Sample Expectiles

Description

Expectiles are fitted to univariate samples with least asymmetrically weighted squares for asymmetries between 0 and 1. For graphical representation an expectile - expectile plot is available. The corresponding functions quantile, qqplot and qqnorm are mapped here for expectiles.

Usage

expectile(x, probs = seq(0, 1, 0.25), dec = 4)

eenorm(y, main = "Normal E-E Plot", xlab = "Theoretical Expectiles", ylab = "Sample Expectiles", plot.it = TRUE, datax = FALSE, ...) eeplot(x, y, plot.it = TRUE, xlab = deparse(substitute(x)), ylab = deparse(substitute(y)), main = "E-E Plot", ...)

Value

Numeric vector with the fitted expectiles.

Arguments

x, y

Numeric vector of univariate observations.

probs

Numeric vector of asymmetries between 0 and 1 where 0.5 corresponds to the mean.

dec

Number of decimals remaining after rounding the results.

plot.it

logical. Should the result be plotted?

datax

logical. Should data values be on the x-axis?

xlab, ylab, main

plot labels. The xlab and ylab refer to the x and y axes respectively if datax = TRUE.

...

graphical parameters.

Author

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

Details

In least asymmetrically weighted squares (LAWS) each expectile is fitted independently from the others. LAWS minimizes:

\( S = \sum_{i=1}^{n}{ w_i(p)(x_i - \mu(p))^2} \)

with

\( w_i(p) = p 1_{(x_i > \mu(p))} + (1-p) 1_{(x_i < \mu(p))} \).

\(\mu(p)\) is determined by iteration process with recomputed weights \(w_i(p)\).

References

Sobotka F and Kneib T (2010) Geoadditive Expectile Regression Computational Statistics and Data Analysis, doi: 10.1016/j.csda.2010.11.015.

See Also

expectreg.ls, quantile

Examples

Run this code
data(dutchboys)

expectile(dutchboys[,3])

x = rnorm(1000)

expectile(x,probs=c(0.01,0.02,0.05,0.1,0.2,0.5,0.8,0.9,0.95,0.98,0.99))

eenorm(x)

Run the code above in your browser using DataLab