Cheng Nie
2015-12-24
This APP can predict the miles per gallon (mpg) based on user input of the following 3 items.
This APP has three tabs
mtcarslibrary(xtable)
data(mtcars)
mtcars$am <- as.numeric(mtcars$am)
mtcars$cyl <- as.factor(mtcars$cyl)
fit <- lm(mpg ~ am + wt + cyl, data = mtcars )
summary(fit)$coef[,c(1,4)]
Estimate Pr(>|t|)
(Intercept) 33.7535920 2.495549e-12
am 0.1501031 9.089474e-01
wt -3.1495978 1.770987e-03
cyl6 -4.2573185 5.514697e-03
cyl8 -6.0791189 1.227964e-03