0

I have a data like this

df<- structure(list(Conc = c(0.03125, 0.0625, 0.125, 0.25, 0.5, 1, 
0.03125, 0.0625, 0.125, 0.25, 0.5, 1, 0.03125, 0.0625, 0.125, 
0.25, 0.5, 1, 0.03125, 0.0625, 0.125, 0.25, 0.5, 1, 0.03125, 
0.0625, 0.125, 0.25, 0.5, 1, 0.03125, 0.0625, 0.125, 0.25, 0.5, 
1), Response = c(167.11246201, 53.96960486, 128.42857143, 43.67173252, 
4.51975684, 0.34042553, 120.10334347, 101.14589666, 155.17629179, 
35.31306991, 8.56534954, 1.7112462, 146.34954407, 108.50151976, 
163.60182371, 64.70212766, 2.88145897, 0.50759878, 82.92401216, 
109.80547112, 116.69300912, 26.85410334, 3.01519757, 0.37386018, 
87.06990881, 84.82978723, 118.36474164, 27.52279635, 2.34650456, 
0.10638298, 89.47720365, 109.47112462, 85.43161094, 17.69300912, 
2.31306991, 0.07294833)), class = "data.frame", row.names = c(NA, 
-36L))

Once I try to set the parameters without knowing what I am really doing

library(drc)

fit <- drm(formula = Response ~ Conc, data = df,
               fct = LL.4(names=c("Slope","Lower Limit","Upper Limit", "EC50")))

Once I let the package to select it for me without knowing what it's doing

fit2 <- drm(formula = Response ~ Conc, data = df, 
           fct = LL.4(names=c("Slope","Lower Limit","Upper Limit", "EC50")),
           lowerl = c(-Inf, 0, min(df$Response), 0), 
           upperl = c(Inf, min(df$Conc), max(df$Conc), Inf))

Can someone help me to understand this ?

Then I see the results are completely different and I personally don't know which way to select the parameters

plot(fit, main = paste("ED(drm, 50):", ED(fit, 50)[[1]]))
plot(fit2, main = paste("ED(drm, 50):", ED(fit2, 50)[[1]]))
Nate
  • 10,361
  • 3
  • 33
  • 40
Learner
  • 757
  • 3
  • 15

1 Answers1

1

By setting the limits in upperl and lowerl you are constraining the paramater estimates. Here the upper limit in fit2 for the "Upper Limit" parameter is set way to low (see the curve is a flat line). If you adjust that to something closer to the observed data then the EC-50 estimate gets a lot closer to fit.

fit3 <- drm(formula = Response ~ Conc, data = df, 
            fct = LL.4(names=c("Slope","Lower Limit","Upper Limit", "EC50")),
            lowerl = c(-Inf, 0, min(df$Response), 0), 
            upperl = c(Inf, min(df$Conc), max(df$Response) - 10, Inf))

plot(fit3, main = paste("ED(drm, 50):", ED(fit, 50)[[1]]))

FWIW when I use drc::drm() I rarely set these limits. The only reason to set them is if you have prior/expert knowledge about how the dose response behaves and the model estimate is violating that. In a case like this, where you have values in the upper plateau and lower plateau, the default arguments will do a good job estimating the EC-50.

Nate
  • 10,361
  • 3
  • 33
  • 40
  • how did you set the lower and upper values? can you please tell me how to calculate IC50 too? or do you know how to calculate AUC as well? – Learner Apr 23 '19 at 20:34