methods {expectreg}R Documentation

Methods for expectile regression objects

Description

Methods for objects returned by expectile regression functions.

Usage


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

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

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

## S3 method for class 'expectreg'
x[i]

## 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, ...)

## S3 method for class 'expectreg'
confint(object, parm = NULL, level = 0.95, ...)

Arguments

x, object

An object of class expectreg as returned e.g. by the function expectreg.ls.

newdata

Optionally, a data frame in which to look for variables with which to predict.

with_intercept

Should the intercept be added to the prediction of splines?

i

Covariate numbers to be kept in subset.

level

Coverage probability of the generated confidence intervals.

parm

Optionally the confidence intervals may be restricted to certain covariates, to be named in a vector. Otherwise the confidence intervals for the fit are returned.

...

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.

[ can be used to define a new object with a subset of covariates from the original fit.

The function coef extracts the regression coefficients for each covariate listed separately. For the function expectreg.boost this is not possible.

Value

[ returns a new object of class expectreg with a subset of covariates from the original fit.

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.

coef returns a list of all regression coefficients separately for each covariate.

Author(s)

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

Elmar Spiegel
Georg August University Goettingen https://www.uni-goettingen.de

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

expectreg.ls, expectreg.boost, expectreg.qp

Examples

data(dutchboys)

expreg <- expectreg.ls(hgt ~ rb(age,"pspline"),data=dutchboys,smooth="f",
                       expectiles=c(0.05,0.2,0.8,0.95))

print(expreg)

coef(expreg)

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

predict(expreg,newdata=new.d)

[Package expectreg version 0.53 Index]