foo = structure(list(effect = c(3.1, 2.3, 1.1, -0.2, -0.7, -1.9, 3.3,
3.2, 1.9, -0.4, -1.6, -2, -3, -3.8, 0.1, 0, -1.4, -2, -3.2, 3,
2.4, 1.2, -0.2, -0.6, -1.7, 3.2, 3.2, 2, -0.3, -1.5, -1.8, -3.1,
-3.9, 0.1, 0.1, -1.2, -2, -3, 3.2, 2.6, 1.2, 0.1, -0.4, -1.7,
3.3, 3.2, 2.1, -0.2, -1.2, -1.5, -2.7, -3.7, 0.2, 0.1, -1.1,
-1.9, -3), d1 = c(0.01, 0.1, 0.3, 1, 10, 20, 0, 0, 0, 0, 0, 0,
0, 0, 1, 1, 1, 1, 1, 0.01, 0.1, 0.3, 1, 10, 20, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 1, 0.01, 0.1, 0.3, 1, 10, 20, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 1, 1), d2 = c(0, 0, 0, 0, 0, 0, 0.01, 0.1,
0.3, 1, 3, 10, 30, 100, 0.01, 0.1, 1, 10, 30, 0, 0, 0, 0, 0,
0, 0.01, 0.1, 0.3, 1, 3, 10, 30, 100, 0.01, 0.1, 1, 10, 30, 0,
0, 0, 0, 0, 0, 0.01, 0.1, 0.3, 1, 3, 10, 30, 100, 0.01, 0.1,
1, 10, 30)), row.names = c(NA, -57L), class = "data.frame")
## quick fix
#idx = with(foo, d2 == max(d2) & d1 == 0)
#foo[idx, ]$effect = foo[idx, ]$effect * c(0.8, 1, 1)
bar = fitMarginals(foo)
## alternative fix
#bar = fitMarginals(foo, fixed = c('h1' = 1, 'h2' = 1))
plot(bar) # not diverging marginal curves
set.seed(1)
baz = fitSurface(foo, bar, null_model='loewe2',
statistic = "both", B.CP = 5, parallel = FALSE
)
Error in harbronLoewe(doseGrid, fitResult$coef) :
Alternative Loewe generalization does not work for diverging marginal curves.
Trying to
fitSurfacewith alternative Loewe null model, I getdiverging marginal curveserror. Staring at the curves they do not seem to diverge. In one of my attempts to debug, it appeared as if theharbronLoewesomehow receives different coefficients than those present inMarginalFitobject. Could be some issue with 4PL asymptotes (see two alternative ways to make the issue go away in reprex below), if that makes any sense.Ubuntu 18.04.4, R 3.6.3, BIGL 1.4.3