Computing the residual sum of squares via RSS():

x<-runif(1:20)
y<-2+3*x+rnorm(20,0,5)
fit<-lm(y~x)
library(MesFonctions)
RSS(fit)

Computing the residual sum of squares via RSS():

x<-runif(1:20)
y<-2+3*x+rnorm(20,0,5)
fit<-lm(y~x)
library(MesFonctions)
RSS(fit)

Computing Allen's PRESS to compare a few linear models PRESS():

x<-runif(1:20)
y<-2+3*x+rnorm(20,0,5)
fit<-lm(y~x)
y<-2+5*x+rnorm(20,0,5)
fit2<-lm(y~x)
library(MesFonctions)
PRESS(fit,fit2)


LamotheGilles/MesFonctions documentation built on May 23, 2019, 11:32 p.m.