Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. salt <- salt_study$Daily.Salt.Intake
  2. strokes <- salt_study$Stroke.deaths.per.million
  3. newsalt <- data.frame(salt=c(9.45, 10.85))
  4. bestline=lm(strokes~salt)
  5. predict(bestline, newsalt, interval = "predict")
  6.  
  7. plot(main="Salt Study", xlab="Daily Salt Intake (g/day)", ylab="Stroke deaths per million people", salt, strokes, xlim=c(7.0, 12.0),ylim=c(0, 4000))
  8. bestline=lm(strokes~salt)
  9. abline(bestline)
  10. summary(bestline)
  11. cor(salt, strokes)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement