拟合约束剂量 - 反应对数 - 逻辑曲线

时间:2016-12-06 07:14:13

标签: r constraints drc

我有剂量反应数据我想拟合log-logistic曲线。

以下是数据:

df <- data.frame(dose=c(10,0.625,2.5,0.15625,0.0390625,0.00244140625,0.009765625,0.0006103515625,10,0.625,2.5,0.15625,0.0390625,0.00244140625,0.009765625,0.0006103515625,10,0.625,2.5,0.15625,0.0390625,0.00244140625,0.009765625,0.0006103515625),
                 response=c(0.990196078431373,0.841175218686903,0.756728767942187,0.650910609644933,0.845425185365378,0.990196078431373,0.990196078431373,0.990196078431373,0.990196078431373,0.990196078431373,0.990196078431373,0.990196078431373,0.990196078431373,0.990196078431373,0.990196078431373,0.990196078431373,0.544378228848476,0.815621363298204,0.810605311840132,0.990196078431373,0.783062670405492,0.761774545153645,0.720957414865623,0.917229218695802))

安装drc LL4型号:

require(drc)
fit <- drm(response~dose,data=df,fct=LL.4(names=c("slope","low","high","ED50")))

并使用预测数据绘制它:

new.data <- expand.grid(dose=exp(seq(log2(max(df$dose)),log2(min(df$dose)),length=100)))
pred <- predict(fit,newdata=new.data,interval="confidence")
points(log2(new.data$dose),pred[,1],type="l")

我得到: enter image description here

但是,我觉得更合适应该是这样的: enter image description here

原因是最高剂量的单点比所有其他点小得多,并强烈表明那里的反应很低。

显然,这些数据中存在很多噪音。其中之一是,响应= 1.0时的所有点最初都较高(由于批量修正),但由于响应&gt;而被推下。 1是我的意思。

对于具有响应&lt;的点,也会发生同样的情况。 0(设置为0)虽然此数据集不具有任何此类数据集。

我的问题是如何获得这样的拟合曲线?如果这是通过限制drm,这些约束应该是什么?

0 个答案:

没有答案