nplr 失败,不清楚原因

nplr failing, unclear why

我尝试 运行 一个 nplr 函数:

require(nplr)

b<- data.frame("Conc" = c(0.03125, 0.046875, 0.0625, 0.09375, 0.1875),"BKA" =c(1.89970905356837, 98.2543214102345, 98.0660619544754, 98.1858634263221, 98.0489474584974))

nplr(x = b$Conc, y = b$BKA)

因错误而失败

Testing pars...
The 3-parameters model showed better performance
Error in nplr(x = b$Conc, y = b$BKA) : 
nplr failed and returned constant fitted values.
        Your data may not be appropriate for such model. 
In addition: Warning message:
In nlm(f = .sce, p = .initPars(x, y, 5), x = x, yobs 
= y, .weight,  :
  NA/Inf replaced by maximum positive value

有人知道为什么会出现此错误吗?

因为 nplr 预期响应值介于 0 和 1 之间,您可以通过除以 100 重新调整 y 值,错误消失,例如:

require(nplr)
require(dplyr)

b<- data.frame("Conc" = c(0.03125, 0.046875, 0.0625, 0.09375, 0.1875),"BKA" =c(1.89970905356837, 98.2543214102345, 98.0660619544754, 98.1858634263221, 98.0489474584974))

b <- 
    b %>% 
    mutate(BKA = BKA/100)

nplr(x = b$Conc, y = b$BKA)