Learn R Programming

DAAG (version 1.25.6)

press: Predictive Error Sum of Squares

Description

Allen's PRESS statistic is computed for a fitted model.

Usage

press(obj)

Value

A single numeric value.

Arguments

obj

A lm object

Author

W.J. Braun

See Also

lm

Examples

Run this code
litters.lm <- lm(brainwt ~ bodywt + lsize, data = litters)
press(litters.lm)
litters.lm0 <- lm(brainwt ~ bodywt + lsize -1, data=litters)
press(litters.lm0) # no intercept
litters.lm1 <- lm(brainwt ~ bodywt, data=litters)
press(litters.lm1) # bodywt only
litters.lm2 <- lm(brainwt ~ bodywt + lsize + lsize:bodywt, data=litters)
press(litters.lm2) # include an interaction term

Run the code above in your browser using DataLab