ocv: Ordinary cross validation score

Description Usage Arguments Value Author(s) References Examples

View source: R/ocv.r

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

1
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

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

blmeco documentation built on Dec. 5, 2019, 5:09 p.m.