expectreg (version 0.50)

methods: Methods for expectile regression objects

Description

Methods for objects returned by expectile regression functions.

Usage

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

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

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

# S3 method for expectreg [(x, i)

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

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

# S3 method for expectreg effects(object, ...)

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

# S3 method for 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.

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 function expectreg.boost 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

expectreg.ls, expectreg.boost, expectreg.qp

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab