Learn R Programming

expectreg (version 0.26)

methods: Methods for expectile regression objects

Description

Methods for objects returned by expectile regression functions.

Usage

## S3 method for class 'expectreg':
plot(x, ...)

## S3 method for class 'expectreg':
print(x, ...)

## S3 method for class 'expectreg':
predict(object, newdata = NULL, ...)

## S3 method for class 'expectreg':
residuals(object, ...)
## S3 method for class 'expectreg':
resid(object, ...)

## S3 method for class 'expectreg':
fitted(object, ...)
## S3 method for class 'expectreg':
fitted.values(object, ...)

## S3 method for class 'expectreg':
effects(object, ...)

## S3 method for class 'expectreg':
coef(object, ...)
## S3 method for class 'expectreg':
coefficients(object, ...)

Arguments

x
An object of class expectreg as returned e.g. by the function expectile.laws.
object
An object of class expectreg as returned e.g. by the function expectile.laws.
newdata
Optionally, a data frame in which to look for variables with which to predict.
...
additional arguments passed over.

Details

These functions can be used to extract details from fitted models. print shows a dense representation of the model fit. The plot function gives a visual representation of the fitted expectiles separately for each covariate. resid returns the residuals in order of the response. fitted returns the overall fitted values $\hat{y}$ while effects returns the values for each covariate in a list. The function coef extracts the regression coefficients for each covariate listed separately. For the functions expectile.boost and expectile.sheets this is not possible.

References

Schnabel S and Eilers P (2009) Optimal expectile smoothing Computational Statistics and Data Analysis, 53:4168-4177 Sobotka F and Kneib T (2010) Geoadditive Expectile Regression Computational Statistics and Data Analysis, doi: 10.1016/j.csda.2010.11.015.

See Also

expectile.laws, expectile.boost, expectile.restricted

Examples

Run this code
data(dutchboys)

expreg <- expectile.laws(hgt ~ base(age,"pspline"),data=dutchboys,smooth="schall",expectiles=c(0.05,0.2,0.8,0.95))
plot(expreg)

print(expreg)

coef(expreg)

new.d = dutchboys[1:10,]
new.d[,2] = 1:10

predict(expreg,newdata=new.d)

Run the code above in your browser using DataLab