2
$\begingroup$

I need to predict ED50 at the inflection point and ED50 at 50%. I am not sure the ED50 (intercept) value calculated by the R library 'drc' is ED50 at the inflection point and ED50 at 50%. Can someone explain what is the difference between both, and how to calculate the other parameter since one of them is predicted by the 'drc' package as default?

I tried to understand the concept from the previous posts in this forum (post1, post2) in vain. Please help.

library(tidyverse)
library(drc)

toxdata<- ryegrass
model<- drm(rootl~conc, data=ryegrass, fct=LL.4(names = c("Slope", "Lower Limit", "Upper Limit", "ED50")))
#you don't need the 'names = ' argument but it's useful to label the b, c, d, and e parameters until you're familiar with
plot(model, type="all")
summary(model)
......................................................
  Model fitted: Log-logistic (ED50 as parameter) (4 parms)
 
  Parameter estimates:

                          Estimate Std. Error t-value   p-value    
  Slope:(Intercept)        2.98222    0.46506  6.4125 2.960e-06 ***
  Lower Limit:(Intercept)  0.48141    0.21219  2.2688   0.03451 *  
  Upper Limit:(Intercept)  7.79296    0.18857 41.3272 < 2.2e-16 ***
  ED50:(Intercept)         3.05795    0.18573 16.4644 4.268e-13 ***
  ---
  Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

  Residual standard error:

   0.5196256 (20 degrees of freedom)
......................................................

ED(model, 50, interval="delta")

......................................................

Estimated effective doses

       Estimate Std. Error   Lower   Upper
e:1:50  3.05795    0.18573 2.67053 3.44538

enter image description here

$\endgroup$
1
  • $\begingroup$ If I search on Google for "ED50 at inflection point" then I find no hits other than this question. Where did you got this terminology from and why do you need to compute it? Possibly my answer is going into the wrong direction based on the assumption that "ED50 at inflection point" is actually a thing and something that you need. (my answer and comments have grown in complexity as I tried to improve the answer and this might be because the term is not a term that you are actually looking for and what people in the field typically use). $\endgroup$ Nov 8, 2022 at 8:21

1 Answer 1

2
$\begingroup$

I can reverse engineer the computation of ED50 in the case of the drc package.

With the code below I recreated the plot from the drc package using the nls function to fit the 4 parameter log-logistic model that the drc package uses. It seems like the package uses as ED50 value the concentration where the estimated effect is 50% of the entire curve.

plot

library(tidyverse)
library(drc)

### DRM stuff

toxdata<- ryegrass
model<- drm(rootl~conc, data=ryegrass, fct=LL.4(names = c("Slope", "Intercept", "ED50")))
plot(model, type="all")
summary(model)

### reverse engineering with nls

### fit the 4 parameter log-logistic model  
mod = nls(rootl ~ c + (d-c)/(1+exp(b*(conc-e))), start = list(b = -1, c = 8, d = 0, e = 1), data = toxdata)

b=coef(mod)[1]  # slope
c=coef(mod)[2]  # lower limit
d=coef(mod)[3]  # upper limit
e=coef(mod)[4]  # 50% level and also inflection point, ED50

### plot data along with fitted model
plot(toxdata$conc,toxdata$rootl, log = "", pch = 20, cex = 0.7)
cs =seq(0,40,0.1)
y = c + (d-c)/(1+exp(b*(cs-e)))
lines(cs,y)

c50 = 3.05795
y50 = c + (d-c)/(1+exp(b*(c50-e)))
points(c50,y50, pch = 21, col = 1, bg = 2)
lines(c(-10,40),c(1,1)*(d+c)/2, lty = 2)

I haven't used ED50 a lot and I had to search for it. According to Wikipedia it is the dose at which a certain effect is appearing in 50% of the population.

An open question is 'what effect' are we talking about. That might relate to the 'inflection point' and the '50%' as definitions of an effect.

In the example above, if we would give a dose with a concentration of 3.05795 then the estimated distribution of the effect in the rye plants would be a normal distribution with a mean rootl around 4.360447 which is the 50% level of the curve. So at a concentration of 3.05795 the median effect will be 4.360447 which is an effect at 50% of the dose-response curve.

Whether you can get the inflection point via drc I am not sure, but it seems to me that in the four parameter logistic function the 50% value and the inflection point are the same because the function is symmetric.


Related to your comment how to get ED90 and your first link (Logistic Regression and Inflection Point). In those cases the modelled variable is a probability for some predifined effect (binomial regression), instead of a numerical response. The use of ED values relate directly to the values of the curve which goes from 0 to 1. Values like ED90 make probably more sense in those cases.

In the case of modelling a numerical value, people also seem to use the term EC50, the 50% effective concentration. The dose where thee effect is at 50% (on average). Possibly that is what you meant by ED50 at 50%.

$\endgroup$
6
  • $\begingroup$ Thanks for the explanation. May you also please guide me on how to get ED90 concentration value using nls? $\endgroup$
    – RanonKahn
    Nov 7, 2022 at 23:39
  • $\begingroup$ I don't know about the package drc but with the nls solution you could look at the estimate for the distribution $Y|X \sim N(\hat{\mu}(X), \hat \sigma)$ where the $\hat{\mu}(X)$ is the fitted line, the estimate for the mean of the population, and $\hat\sigma$ is an estimate for the variance (which can be based on the residual variance). The 10% quantile of the normal distribution is approximately -1.28, so if $\hat{\mu}(X)-target = -1.28 \hat{\sigma}$ then 90% of the population is estimated to be above the target level. Then solve $X$ such that $\hat{\mu}(X) = target-1.28 \hat{\sigma}$ $\endgroup$ Nov 8, 2022 at 6:56
  • $\begingroup$ The approach that I describe here is however problematic. The error distribution is not homogeneous and also it might not be Gaussian. You see that especially around the inflection point the error is large. This is because the value is not as easy as a basic curve ± some normal distributed error. You get for instance variations in pharmacological parameters among different people and these will result in different error distribution... $\endgroup$ Nov 8, 2022 at 7:01
  • $\begingroup$ ...At a concentration 30 the variance is small, everyone will drop to close to zero. At 0 the variance is larger people will have different starting values. At the inflection point the variance is the largest. The values will drop quickly, the curve is steep, but with some people it will take longer than with others and that creates a large spread.... $\endgroup$ Nov 8, 2022 at 7:03
  • $\begingroup$ ... So it seems better to use something like an error-in-variables model. And model the distribution based on the estimates of that. Possibly quantile regression might also help you out, I believe that that would be the easiest approach. But to reliably compute ED90 you would need more values. I wonder if quantile regression, with 10th percent quantile, would even converge with so few points. $\endgroup$ Nov 8, 2022 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.