问题是:臂长为30 in。的个体的预计重复次数是多少?讨论线性逼近的适当性。
但是在尝试预测数据时遇到了问题。找不到BenchPress。
combine <- read.csv("C:/Users/Yuxi Liu/Desktop/nfl_combine2017.csv")
cols <- c("ArmLength", "BenchPress")
x <- combine$ArmLength
y <- combine$BenchPress
combine_model = lm(ArmLength ~ BenchPress, data = combine)
confint(combine_model, conf.level=0.95)
summary((combine_model)$coefficients)
plot(ArmLength~ BenchPress, data = combine,
xlab = "Arm Length",
ylab = "Bench Press",
main = "Arm Length vs Bench Press",
pch = 10,
cex = 1,
col = "grey")
abline(lm(combine_model))
combine_model = lm(ArmLength ~ BenchPress, data = combine)
new.combine <- data.frame(x=c(30))
predict(combine_model, new.combine, se.fit = TRUE)
eval(predvars,data,env)中的错误:找不到对象'BenchPress'