ocv {blmeco}R Documentation

Ordinary cross validation score

Description

Sum of squared differences between the out-of-data prediction and the observation for the leave-one-out cross validation for linear models with normal error structure (lm-objects)

Usage

ocv(mod)

Arguments

mod

an lm-object

Value

the ordinary cross validation score

Author(s)

F. Korner

References

e.g. Wood, SN (2006) Generalized Additive Models, An Introduction with R. Chapman & Hall/CRC, London.

Examples

data(pondfrog1)
mod1 <- lm(log(frog+1)~ph, data=pondfrog1)
mod2 <- lm(log(frog+1)~waterdepth, data=pondfrog1)
ocv(mod1)
ocv(mod2)

[Package blmeco version 1.4 Index]