Simple Regression Equation

Simple Regression Equation



x<-c(10,20,30,40,50)
y<-c(60,70,80,90,100)
x
y
datasets::faithful
linear1=lm(y~x,faithful)
linear1
lm(formula=y~x,data=faithful)
resid(linear1)
ynew=faithful$eruptions
ycap=fitted(linear1)
SSE=(resid(linear1)^2)
SSE
ybar=mean(faithful$eruptions)

SST=((ycap-ybar)^2)
SST
SSR=SST+SSE
SSR


EmoticonEmoticon