x=c(0,0,1,.5,1,1.5,1.5,2,2,2.5,3,3,3.5,5)
y=c(0,1,1,2,2,2,3,3,4,4,5,6,5.5,3)
plot(x,y)
mod.with=lm(y~x)
abline(mod.with,col="blue")
text(5,3,"Point C",pos=2)
x=c(0,0,1,.5,1,1.5,1.5,2,2,2.5,3,3,3.5)
y=c(0,1,1,2,2,2,3,3,4,4,5,6,5.5)
mod.with=lm(y~x)
abline(mod.with,col="red",lty=2)
legend("bottomright",c("With Point C","Without Point C"),
bty="n",lty=c(1,2),col=c("blue","red"))
Point C is both an outlier and influential.
x=c(28.5,25,70,65,54.6,50,45,44)
y=c(94,84.9,185,110,170,150.7,140,135.5)
plot(x,y)
mod.with=lm(y~x)
abline(mod.with,col="blue")
x=c(28.5,25,65,54.6,50,45,44)
y=c(94,84.9,110,170,150.7,140,135.5)
mod.with=lm(y~x)
abline(mod.with,col="red",lty=2)
legend("topright",c("With Point (70,185)","Without Point (70,85)"),
bty="n",lty=c(1,2),col=c("blue","red"))
The point (70,185) is an outlier but it isn’t influencial.