Learn R Programming

KSPM (version 0.2.1)

residuals.kspm: Extract residuals from a Kernel Semi Parametric Model

Description

Returns the vector of residuals for a model fit of class "kspm".

Usage

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

Arguments

object

an object of class "kspm", usually, a result of a call to kspm.

...

additional optional argument (currently unused).

Value

A vector of residuals. The vector length is the number of observations used in model coefficients estimation (see nobs.kspm).

See Also

kspm for fitting model, nobs.kspm, rstandard.kspm.

Examples

Run this code
# NOT RUN {
x <- 1:15
y <- 3*x + rnorm(15, 0, 2)
fit <- kspm(y, kernel = ~ Kernel(x, kernel.function = "linear"))
residuals(fit)

# }

Run the code above in your browser using DataLab