奇怪的 ED50 与 drc
Strange ED50 with drc
我正在尝试使用 drc
包估算 IC50 值。绘制模型效果很好。但是当我使用 ED
时,我得到了不合理的结果。
根据我的理解,IC50 应该在模型的拐点附近。在这种情况下,我估计约为 0.25。但是 ED
将其计算为 -1.43。
我是用错了 ED
还是漏掉了什么?
谢谢
带有数据的最小示例:
# Create Data
Conc <- c(0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000)
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.71124620, 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)
df <- data.frame(Conc = Conc, Response = Response)
# Make Modell
library(drc)
drm <- drm(Response ~ Conc, data = df, fct = LL2.4())
plot(drm, main = paste("ED(drm, 50):", ED(drm, 50)[[1]]))
# Calculate ED50 (IC50)
ED(drm, 50)
希望这个回复还不算太晚。
因为你在调用 LL2.4() 时没有固定 c 和 d 参数,算法会得出它们的估计值;因此,需要计算估计的c和d之间的mid-point。
我不知道为什么,但是当你在 ed 的调用中添加 logBase=exp(1) 时,结果符合你的预期。
Conc = c(0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000)
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.71124620, 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)
df = data.frame(Conc = Conc, Response = Response)
ll24fit = drm(Response ~ Conc, data = df, fct = LL2.4())
# Calculate ED50 (IC50)
coefValues = summary(ll24fit)[["coefficients"]]
midPoint = mean(coefValues[2:3])
ed50 = ED(ll24fit, 50,logBase=exp(1), interval="delta")
plot(ll24fit, log="", main = paste("ED(drm, 50):", ED(ll24fit, 50, logBase=exp(1))[[1]]))
abline(v=ed50[1], col="#666666", lty="longdash", lwd=0.75)
abline(h=midPoint, col="#666666", lty="longdash", lwd=0.75)
我正在尝试使用 drc
包估算 IC50 值。绘制模型效果很好。但是当我使用 ED
时,我得到了不合理的结果。
根据我的理解,IC50 应该在模型的拐点附近。在这种情况下,我估计约为 0.25。但是 ED
将其计算为 -1.43。
我是用错了 ED
还是漏掉了什么?
谢谢
带有数据的最小示例:
# Create Data
Conc <- c(0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000)
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.71124620, 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)
df <- data.frame(Conc = Conc, Response = Response)
# Make Modell
library(drc)
drm <- drm(Response ~ Conc, data = df, fct = LL2.4())
plot(drm, main = paste("ED(drm, 50):", ED(drm, 50)[[1]]))
# Calculate ED50 (IC50)
ED(drm, 50)
希望这个回复还不算太晚。
因为你在调用 LL2.4() 时没有固定 c 和 d 参数,算法会得出它们的估计值;因此,需要计算估计的c和d之间的mid-point。
我不知道为什么,但是当你在 ed 的调用中添加 logBase=exp(1) 时,结果符合你的预期。
Conc = c(0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000)
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.71124620, 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)
df = data.frame(Conc = Conc, Response = Response)
ll24fit = drm(Response ~ Conc, data = df, fct = LL2.4())
# Calculate ED50 (IC50)
coefValues = summary(ll24fit)[["coefficients"]]
midPoint = mean(coefValues[2:3])
ed50 = ED(ll24fit, 50,logBase=exp(1), interval="delta")
plot(ll24fit, log="", main = paste("ED(drm, 50):", ED(ll24fit, 50, logBase=exp(1))[[1]]))
abline(v=ed50[1], col="#666666", lty="longdash", lwd=0.75)
abline(h=midPoint, col="#666666", lty="longdash", lwd=0.75)