Session Ready
Exercise

Logistic regression

In toxicology studies, organisms are often dosed and binary outcomes often occur such as dead/alive or inhibited/mobile. This is called a dose-response study. For example, the response to different doses might be mortality (1) or survival (0) at the end of a study.

During this exercise, we will fit a logistic regression using all three methods described in the video. You have been given two datasets.

  • dfLong, in a "long" format with each row corresponding to an observation (i.e., a 0 or 1).
  • dfShort, in an aggregated format with each row corresponding to a treatment (e.g., 6 successes, 4 failures, number of replicates = 10, proportion = 0.6).

When using the "wide" or "short" data frame, the "success, failure" methods for inputing logistic regression results require success and failure be a matrix. The easiest way to do this is with the cbind() function.

Instructions 1/3
undefined XP
  • 1
  • 2
  • 3
  • Using the data dfLong, fit a glm() with the "binomial" distribution family (or, synonymously, binomial error term) where mortality is predicted by dose.
  • Look at the summary() of the model.