pressind | R Documentation |
Computes the PRESS (Predicted residual sum of squares) statistics of a regression model.
pressind(model = model)
model |
an object having the fitted model. |
The function computes the PRESS based on the Hat matrix of a previously fitted model.
The main output is the PRESS statistics
Christian Salas-Eljatib.
Myers RH. 1990. Classical and Modern Regression with Applications. Second Edition. Duxbury Classic Series, Pacific Grove, CA, USA.
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.