我使用以下脚本绘制了下面的散点图,但仍需要获取回归系数。
任何帮助将不胜感激。
lm.irt12 <- lm(prtemp ~ irt12,data=apirt)
summary(lm.irt12)
plot(apirt$irt12[apirt$surv==1],
apirt$prtemp[apirt$surv==1],
xlab="ave. base of ears (°C)",
ylab="rectal (°C)",
xlim=c(26,42),
ylim=c(30,42),
col='blue')
points(apirt$irt12[apirt$surv==0], apirt$prtemp[apirt$surv==0],col='red')
abline(lm.irt12)
abline(h=36,v=0, col="gray10",lty=20)
#col = "gray60" OR col = "lightgray", lty=3; #(lty=3: broken line, 1:continuous)
text(26.7,36.7,parse(text='36*degree'),col='gray10')
abline(h=34,v=0, col="gray10",lty=20)
#col = "gray60" OR col = "lightgray", lty=3; #(lty=3: broken line, 1:continuous)
text(26.7,34.7,parse(text='34.0*degree'),col='gray10')