6. Problem set 6

Due by 11:59 AM on Monday, April 6, 2020

Required

1. Log Transformations

Estimate the relationship between Number of Hospitals and Doctors within a sample of counties in the dataset called CountyHealth. (This dataset is from the Stat2Data package, just like other problems from the book and you can bring it in like the code we’ve used in class or on previous homework problems (e.g., “Cereal”, or “Perch”))

  1. Make a scatterplot of the relationship between MDs as the response and Hospitals as the explanatory variable and comment on what you see.

  2. Make a new variable of the log of MDs and make a scatterplot of the relationship between logged version of MDs and Hospitals.

  3. Fit the regression model of the relationship of the logged version of MDs and Hospitals and interpret the slope in a sentence.

  4. Use the regression model from “c” to predict the number of doctors (not log(MDs)) for 4 counties: one with 2,3,9, and 10 hospitals, respectively. Comment on how the difference in predicted number of doctors between the counties with 2 & 3 and 9 & 10 hospitals values corresponds to the regression slope from “c”.

2. Odds, Probabilities, and Odds Ratios

Below are data from an Intensive Care Unit ICU, on whether someone Survived (Yes/No) and their age group (Youngest: <50yo, Middle: 50-69, Oldest: 70+).

AgeGroup Yes No
Youngest 54 5
Middle 60 17
Oldest 46 18

  1. Calculate the odds of surviving in the ICU for those in the youngest, middle, and oldest age groups. Interpret the odds of survival for the oldest group in a sentence.

  2. From the odds in “a”, calculate the probability of survival for each age group. Interpret the probability of survival for the youngest group in a sentence.

  3. From the table above, calculate the proportion of the youngest group who survived and compare this answer to your answer in “b”.

  4. Calculate a ratio of the odds of survival between those who are Middle vs. Youngest, and a ratio for those Oldest vs. Middle Aged. (No need to interpret, just calculate).

Submit on Moodle

There is no template for this assignment. You’re a pro at making your own RMarkdown files now!

You are expected to knit to pdf. Please allow enough time to resolve any errors before the deadline.

Use the Homework 6 submission on Moodle for section 1 or section 2.