Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. Year Location Country Age Injury Survived Time
  2. 0 2016 chittwan Nepal 09 attack on head 0 11h00
  3. 1 2016 siberia Russia 19 Neck Injury 0 13h00
  4. 2 2016 Oba Hills Nigeria 23 lower leg 1 04h43
  5. 3 2016 Edumanom Nigeria 65 leg injury 0 11h00
  6. 4 2016 Kanha India NaN attacked from behind 1 18h00
  7. 5 2016 Edumanom Nigeria 09 attack on head 0 19h00
  8. 6 2016 Ranthambore India 39 Neck Injury 0 11h00
  9. 7 2016 chittwan Nepal 13 attacked from behind 1 09h12
  10. 8 2016 Edumanom Nigeria NaN leg injury 1 11h00
  11. 9 2016 Bikin Russia NaN leg injury 1 13h00
  12.  
  13. library(MASS) # Load the MASS library, which contains the glm function
  14.  
  15. model = glm(Survived ~ Location + Country + Injury + Time) # Define a model of whether the victim survived, predicting on location, country, injury and time of attack
  16.  
  17. summary(model) # View the model coefficients to interpret the model
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement