View the step-by-step solution to:

Question

species region pos_x pos_y age long_cm wide_cm sex lesions injured teeth_condition weight antibody pollutant

Striped 5 858 63 0.9 29 25 M 1 1 Good 636 274 501 Albino 1 66 62 0.1 111 116 M 1 0 Average 230 657 451 Black 2 309 779 6.4 272 141 F 0 0 Bad 675 145 1220 Albino 1 142 34 2.2 152 96 M 1 1 Very Bad 993 292 638 Black 1 175 812 2.8 95 61 M 2 0 Good 1271 415 813 Striped 4 722 594 0.8 28 24 F 0 1 Average 740 143 270 Brown 4 748 341 0.8 52 43 M 3 0 Bad 670 594 893 Striped 1 88 9 1.8 39 20 F 0 0 Very Bad 844 138 279 Striped 1 132 523 2 42 28 M 2 0 Good 1212 440 671 Bald 5 899 103 0.3 61 48 F 0 0 Average 431 202 279 Albino 1 188 728 5.2 380 196 M 2 0 Bad 1143 598 1036 Striped 2 268 819 0.5 31 31 M 0 1 Very Bad 497 148 276 Black 4 795 41 0.5 65 68 M 2 0 Good 581 460 723 Bald 5 983 985 4 182 85 F 1 0 Average 1288 297 1024 Striped 1 103 974 1.8 39 26 M 1 0 Bad 1034 285 488 Brown 3 560 650 0.6 44 38 M 1 0 Very Bad 636 276 470 Bald 3 497 182 0.2 63 78 M 2 0 Good 383 467 673 Black 2 359 632 1.3 64 55 M 2 1 Average 629 413 833 Bald 2 306 87 0.3 73 64 F 0 0 Bad 478 163 293 Black 1 44 8 0.4 69 55 M 1 1 Very Bad 415 376 484 Bald 1 98 423 1.4 69 75 M 1 1 Good 960 301 513 Striped 4 636 447 5.3 96 44 F 0 0 Average 815 137 385 Striped 5 924 837 2.3 40 30 F 1 0 Bad 1339 277 574 Brown 3 474 979 2.2 71 43 F 2 0 Very Bad 1288 420 773 Bald 1 9 281 3.9 191 112 M 0 0 Good 1227 180 435 Albino 5 855 892 7.5 489 275 F 0 1 Average 378 311 1773 Albino 3 410 252 0.4 103 98 F 0 0 Bad 323 210 291 Bald 5 963 244 0.4 65 71 M 1 1 Very Bad 373 338 494 Brown 2 252 292 2.7 84 49 F 3 0 Good 1432 567 1067 Brown 2 213 635 7.5 209 123 F 0 0 Average 463 168 868 Albino 2 221 452 1.6 106 112 M 1 1 Bad 979 275 777 Black 1 70 79 0.8 71 67 F 1 0 Very Bad 779 266 495 Black 5 825 441 3.2 139 86 F 2 0 Good 1516 413 1249 Striped 3 541 500 2.3 36 25 F 1 1 Average 962 264 494 Brown 1 137 763 0.7 44 47 M 3 1 Bad 689 591 877 Brown 1 180 258 1.8 56 33 F 0 0 Very Bad 1029 160 296 Striped 3 536 439 0.6 26 24 F 1 0 Good 588 274 469 Brown 4 643 975 1.8 62 47 M 1 1 Average 940 277 562 Bald 2 335 700 1 68 64 M 0 0 Bad 830 136 370 Black 5 961 57 4.4 202 131 M 0 1 Very Bad 1306 166 994 Black 5 874 549 2 68 67 M 1 1 Good 1200 281 804 Black 3 442 29 2.2 76 62 M 0 0 Average 1079 142 497 Black 2 215 646 1.7 63 64 M 0 0 Bad 1129 145 516 Albino 3 404 173 0.3 117 117 M 0 0 Very Bad 406 195 295 Albino 4 695 344 0.6 114 96 M 2 0 Good 498 566 741 Black 4 636 20 0.2 72 73 M 0 0 Average 273 247 276 Bald 3 517 53 0 70 63 M 2 0 Bad 229 508 641 Albino 4 650 320 1.6 93 87 M 1 0 Very Bad 1163 359 679 Bald 2 289 817 8.7 334 202 F 0 0 Good 201 252 1094 Bald 1 82 813 6.4 242 185 M 1 0 Average 874 300 746 Bald 2 391 637 4 154 101 F 0 0 Bad 1180 148 740 Brown 5 980 638 0.2 48 37 F 2 0 Very Bad 336 482 676 Bald 4 788 220 1.1 54 64 F 3 0 Good 570 623 930 Black 3 553 103 1.4 58 57 F 1 0 Average 760 264 582 Striped 1 82 251 7 126 92 M 0 0 Bad 595 193 349 Black 1 149 311 1.2 66 58 M 0 1 Very Bad 883 147 332 Bald 3 529 269 1.2 73 72 M 0 1 Good 982 149 342 Brown 1 9 445 1.7 42 40 F 0 0 Average 915 147 293 Brown 2 378 344 12.1 404 172 F 2 0 Bad 547 476 1678 Black 3 567 77 2.1 88 67 M 3 0 Very Bad 1191 575 1052


The dataset Marmots_real.csv has the data from 60 marmots, including many variables that are easier to measure:

 

Variable Name Type Description

Species Categorical, Unordered One of five species of giant marmot

Region Categorical, Unordered One of five regions around Moscow where the subject is captured

Age Numerical, Continuous Age in years

Pos_x Numerical, Continuous Longitude, recoded to (0,1000), of capture

Pos_y Numerical, Continuous Latitude, recoded to (0,1000), of capture

Long_cm Numerical, Continuous Length nose to tail in cm

Wide_cm Numerical, Continuous Width between front paws, outstretched

Sex Binary M or F

Lesions Numerical, Count Number of skin lesions (cuts, open sores) found upon capture

Injured Binary 0 or 1, 1 if substantial injury was observed upon capture.

Teeth_Condition Categorical, Ordered Condition of teeth upon capture, listed as Very Bad, Bad, Average, or Good.

Weight Numerical, Continuous Mass of subject in 100g

Antibody Numerical, Continuous Count of CD4 antibody in blood per mL

Pollutant Numerical, Continuous mg/kg of selenium found in bone marrow

 

There are no sampling weights. There is no missing data. There should be little to no convergence or computational issues with this data.

Assignment parts:

M1) Build a logistic model of injured, as a function of species, age, weight, number of lesions, and amount of pollutant.

a) Write the regression equation. (do not include the error term)

b) Interpret the intercept

c) Interpret the first of the species coefficients.

d) Interpret the age coefficient.

M2) Make a model with a better AIC than the one shown in the example code. Show this by using the AIC() function on both the original model and your model.



Useful sample code:

#### MARMOTS

######## Preamble / Setup

## Load the .csv file into R. Store it as 'dat'

dat = read.csv("marmots_real.csv")

dat$region = as.factor(dat$region)


library(car) # for vif()


### Build a logistic model of injured or not.

mod = glm(injured ~ species + age + weight + lesions + pollutant, data=dat, family="binomial")

summary(mod)

vif(mod)

plot(mod)

AIC(mod)

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question