October 2017
Beginner to intermediate
572 pages
26h 1m
English
Perform the following steps to predict values with multiple regression:
> model = lm(income ~ prestige + women, Prestige)
> newdat = data.frame(prestige = c(75,80), women=c(14,13))
> predict(model, newdata = newdat) Output: 1 2 12194.80 13072.56
Compute the prediction result using this prediction interval:
> predict(model, newdata = newdat, interval="predict")Output: fit lwr upr1 12194.80 6994.903 17394.692 13072.56 7847.050 18298.06
Read now
Unlock full access