Learn R Programming

KSPM (version 0.2.1)

deviance.kspm: Model deviance

Description

Returns the deviance of a fitted model object of class "kspm".

Usage

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

Arguments

object

an object of class "kspm", usually, a result of a call to kspm, for which the deviance is desired.

...

additional optional argument (currently unused).

Value

The value of the deviance extracted from the object object.

Details

This function extracts deviance of a model fitted using kspm function. The returned deviance is the residual sum of square (RSS).

See Also

kspm, extractAIC.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"))
deviance(fit)

# }

Run the code above in your browser using DataLab