Learn R Programming

AdaptFitOS (version 0.69)

residuals.asp: Residuals for semiparametric regression.

Description

Extracts residuals from a semiparametric regression fit object.

Usage

# S3 method for asp
residuals(object,...)

Value

The vector of residuals.

Arguments

object

a fitted asp object as produced by asp2().

...

other possible arguments.

Details

Extracts residuals from a semiparametric regression fit object. The residuals are defined to be the difference between the response variable and the fitted values.

See Also

plot.asp, predict.asp, summary.asp, fitted.asp

Examples

Run this code
data(fossil,package="SemiPar")
attach(fossil)
fit <- asp2(strontium.ratio~f(age))
plot(age,residuals(fit))
abline(0,0)

Run the code above in your browser using DataLab