pressind: Function to compute the PRESS statistics of a regression...

View source: R/pressind.r

pressindR Documentation

Function to compute the PRESS statistics of a regression model .

Description

Computes the PRESS (Predicted residual sum of squares) statistics of a regression model.

Usage

pressind(model = model)

Arguments

model

an object having the fitted model.

Details

The function computes the PRESS based on the Hat matrix of a previously fitted model.

Value

The main output is the PRESS statistics

Author(s)

Christian Salas-Eljatib.

References

  • Myers RH. 1990. Classical and Modern Regression with Applications. Second Edition. Duxbury Classic Series, Pacific Grove, CA, USA.

Examples


#Creates a fake dataframe
set.seed(12)
df <- as.data.frame(cbind(Y=rnorm(30, 30,9), X=rnorm(30, 450,133)))
#fitting a candidate model
mod1 <- lm(Y~X, data=df)
#Using the `pressind` function
pressind(mod1)

datana documentation built on Aug. 18, 2025, 5:18 p.m.