quant.bundle: Restricted expectile regression of additive models

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

Description

A location-scale model to fit generalized additive models with least asymmetrically weighted squares to obtain the graphs of different expectiles or quantiles for continuous, spatial or random effects.

Usage

1
2
quant.bundle(formula, data = NULL, smooth = c("schall", "acv", "fixed"), 
             lambda = 1, quantiles = NA, simple = TRUE)

Arguments

formula

An R formula object consisting of the response variable, '~' and the sum of all effects that should be taken into consideration. Each effect has to be given through the function rb.

data

Optional data frame containing the variables used in the model, if the data is not explicitely given in the formula.

smooth

There are different smoothing algorithms that should prevent overfitting. The 'schall' algorithm iterates the smoothing penalty lambda until it converges, the asymmetric cross-validation 'acv' minimizes a score-function using nlm or the function uses a fixed penalty.

lambda

The fixed penalty can be adjusted. Also serves as starting value for the smoothing algorithms.

quantiles

In default setting, the quantiles (0.01,0.02,0.05,0.1,0.2,0.5,0.8,0.9,0.95,0.98,0.99) are calculated. You may specify your own set of expectiles in a vector.

simple

A binary variable depicting if the restricted expectiles (TRUE) or the bundle is used as basis for the quantile bundle.

Details

In least asymmetrically weighted squares (LAWS) each expectile is fitted by minimizing:

S = ∑_{i=1}^{n}{ w_i(p)(y_i - μ_i(p))^2}

with

w_i(p) = p 1_{(y_i > μ_i(p))} + (1-p) 1_{(y_i < μ_i(p))} .

The restricted version fits the 0.5 expectile at first and then the residuals. Afterwards the other expectiles are fitted as deviation by a factor of the residuals from the mean expectile. This algorithm is based on He(1997). The advantage is that expectile crossing cannot occur, the disadvantage is a suboptimal fit in certain heteroscedastic settings. Also, since the number of fits is significantly decreased, the restricted version is much faster.

The expectile bundle has a resemblence to the restricted regression. At first, a trend curve is fitted and then an iteration is performed between fitting the residuals and calculating the deviation factors for all the expectiles until the results are stable. Therefore this function shares the (dis)advantages of the restricted.

The quantile bundle uses either the restricted expectiles or the bundle to estimate a dense set of expectiles. Next this set is used to estimate a density with the function cdf.bundle. From this density quantiles are determined and inserted to the calculated bundle model. This results in an estimated location-scale model for quantile regression.

Value

An object of class 'expectreg', which is basically a list consisting of:

lambda

The final smoothing parameters for all expectiles and for all effects in a list. For the restricted and the bundle regression there are only the mean and the residual lambda.

intercepts

The intercept for each expectile.

coefficients

A matrix of all the coefficients, for each base element a row and for each expectile a column.

values

The fitted values for each observation and all expectiles, separately in a list for each effect in the model, sorted in order of ascending covariate values.

response

Vector of the response variable.

covariates

List with the values of the covariates.

formula

The formula object that was given to the function.

asymmetries

Vector of fitted expectile asymmetries as given by argument expectiles.

effects

List of characters giving the types of covariates.

helper

List of additional parameters like neighbourhood structure for spatial effects or 'phi' for kriging.

trend.coef

Coefficients of the trend function.

residual.coef

Vector of the coefficients the residual curve was fitted with.

asymmetry

Vector of the asymmetry factors for all expectiles.

design

Complete design matrix.

fitted

Fitted values \hat{y} .

plot, predict, resid, fitted and effects methods are available for class 'expectreg'.

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

Sabine Schnabel
Wageningen University and Research Centre
http://www.wur.nl

Paul Eilers
Erasmus Medical Center Rotterdam
http://www.erasmusmc.nl

References

Schnabel S and Eilers P (2009) Optimal expectile smoothing Computational Statistics and Data Analysis, 53:4168-4177

He X (1997) Quantile Curves without Crossing The American Statistician, 51(2):186-192

Schnabel S and Eilers P (2011) A location scale model for non-crossing expectile curves (working paper)

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

See Also

rb, expectreg.boost

Examples

1
2
3
4
qb = quant.bundle(dist ~ rb(speed),data=cars,smooth="f",lambda=5)
plot(qb)

qbund <- quant.bundle(dist ~ rb(speed),data=cars,smooth="f",lambda=50000,simple=FALSE)

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