inst/Templates/press.R

PRESS <- function(LinearModel) {
    return(sum((residuals(LinearModel)/(1 - lm.influence(LinearModel)$hat))^2))
}



PredRSquared <- function(LinearModel) {
    TSS <- sum(anova(LinearModel)$"Sum Sq")
return(1 - PRESS(LinearModel)/TSS)
}

Try the BrailleR package in your browser

Any scripts or data that you put into this service are public.

BrailleR documentation built on July 26, 2023, 5:46 p.m.