October 2017
Beginner to intermediate
572 pages
26h 1m
English
Perform the following steps to predict values with linear regression:
> lmfit = lm(y1~x, Quartet)
> newdata = data.frame(x = c(3,6,15))
> predict(lmfit, newdata, interval="confidence", level=0.95) Output: fit lwr upr 1 4.500364 2.691375 6.309352 2 6.000636 4.838027 7.163245 3 10.501455 8.692466 12.310443
> predict(lmfit, newdata, interval="predict") Output: fit lwr upr 1 4.500364 1.169022 7.831705 2 6.000636 2.971271 9.030002 3 10.501455 7.170113 13.832796
Read now
Unlock full access