A running list of little tasks to prep for Fall 2024. I did the best I could in Fall 2023, but there is still a lot of cleaning up and improving to do.
Left off
2023-09-29: Completed the first draft of the intro to regression chapter and the individual glm chapters.
Tasks
[ ] Show them how to calculate IPR, IPD, Odds, OR, IRR, and IRD using regression.
[ ] Lab and quiz. Have them calculate the odds using the methods in measures of association first, then using regression.
[ ] Lab. In Fall 2022, I did the bare minimum just to have something done. Add more questions. Walk them through understanding regression results by showing comparisons to means and proportions. Add some graphs. Have the do more interpretation (currently, the basically just have to fill in the blank with a number from the results). Really focus on using this as a teaching tool, not just an assessment tool.
[ ] Module quiz. In Fall 2023, I did the bare minimum just to have something done. Add more questions. Walk them through understanding regression results by showing comparisons to means and proportions. Add some graphs. Have the do more interpretation (currently, the basically just have to fill in the blank with a number from the results). You can also add multiple-choice questions that don't involve coding.
[ ] Module quiz. Task 5 asks students to model ever had a drink by age. The point estimate is 0.99 and the p-value is highly significant. This is a great opportunity to ask a question about the clinical significance vs. statistical significance.
[ ] Module quiz. Task 6 is just a standard logistic regression question. However, I kept getting a weird answer. Males had 2 times the odds of the outcome -- ever drink -- but, my regression results kept telling me that females had 2 times the odds. I called Doug and we finally figured it out. The problem was that the outcome variable, ALQ111, was coded as 1 = Yes and 2 = No instead of 0 = No and 1 = Yes. So, the model was estimating the log odds of NOT ever drinking. Apparently, the glm() function will predict the first value of the regressand, by default. To fix this issue, you have to either have to recode the outcome variable to 0/1 or you have to use something like nhanes$ALQ111_f <- relevel(nhanes$ALQ111_f, ref = "No"). You should definitely add this to R4Epi and the lab.
[ ] Lab warm-up. There isn't a Socrative for this module really (it has one question). I'm going to walk through my lab warm-up R code instead (Fall 2023). This content was added to R4Epi this semester, so it isn't "new," but the way I added it was really disorganized. So, I'm walking through it again. If I get it organized in the future, then I should use different content for the lab warm-up. Possibly put quite a lot of emphasis on The Book of Why?
Overview
A running list of little tasks to prep for Fall 2024. I did the best I could in Fall 2023, but there is still a lot of cleaning up and improving to do.
Left off
2023-09-29: Completed the first draft of the intro to regression chapter and the individual glm chapters.
Tasks
ALQ111
, was coded as 1 = Yes and 2 = No instead of 0 = No and 1 = Yes. So, the model was estimating the log odds of NOT ever drinking. Apparently, theglm()
function will predict the first value of the regressand, by default. To fix this issue, you have to either have to recode the outcome variable to 0/1 or you have to use something likenhanes$ALQ111_f <- relevel(nhanes$ALQ111_f, ref = "No")
. You should definitely add this to R4Epi and the lab.