Notes 8

Modeling Proportions with Binomial Distribution | Part 3: Probit Link, Median Effective Dose

Setup

Loading packages

library(tidyverse)
## Warning: package 'ggplot2' was built under R version 4.3.3
library(GLMsData)
library(broom)
## Warning: package 'broom' was built under R version 4.3.3

Section 9.6 - Median Effective Dose

(Basically, given a probability - solving for x.)

From text: “Binomial GLMs are commonly used to examine the relationship between the dose \(d\) of a drug or poison and the proportion \(y\) of insects (or plants, or animals) that survive. These models are called dose–response models. Associated with these experiments is the concept of the median effective dose, ED50: the dose of poison affecting 50% of the insects.

We use the systematic component of the model to find this dose \(d\):

\[g(\mu) = \beta_0 + \beta_1 d,\]

where \(g()\) is the link function (either logit or probit). After fitting the model, we know the maximum likelihood estimates of the beta parameters, \(\hat{\beta}_0\) and \(\hat{\beta}_1\). We can then use algebra to solve for \(d\), the dose that affects a proportion of \(\mu\) of the insects:

\[ d = \frac{g(\mu) - \hat{\beta}_0}{\hat{\beta}_1} \]

turbines example

To calculate the run time for which 50% of turbines would be expected to experience fissures:

  • Under the logit model: \(g(\mu) = \log\frac{\mu}{1-\mu}\)
mu <- .5
num <- log(mu/(1-mu)) - tidy(fit_logit)$estimate[1] # num: numerator of fraction
num / tidy(fit_logit)$estimate[2]
## [1] 3926.592
  • Under the probit model: \(g(\mu) = qnorm(\mu)\)
mu <- .5
num <- qnorm(mu) - tidy(fit_probit)$estimate[1] # num: numerator of fraction
num / tidy(fit_probit)$estimate[2]
## [1] 3935.197

These numbers should seem reasonable based on our graph above.

We could of course calculate the run time for any percent of failure rate, say 20% (as long as it’s reasonable based on the data):

  • Under the logit model:
# calculate
mu <- .2
num <- log(mu/(1-mu)) - tidy(fit_logit)$estimate[1] # num: numerator of fraction
num / tidy(fit_logit)$estimate[2]
## [1] 2539.239
  • Under the probit model:
# calculate
mu <- .2
num <- qnorm(mu) - tidy(fit_probit)$estimate[1] # num: numerator of fraction
num / tidy(fit_probit)$estimate[2]
## [1] 2479.913