Skip to content
Prev 6954 / 20628 Next

Error in nlmer gradient must be of size...

Luciano Selzer <luciano.selzer at ...> writes:
[snip]
The error message is actually informative ... you have three
variables, but your derivative function was based on four variables
(you included "PPF").  I changed it to 

fModf <- deriv(body(fModel), namevec = c("Amax", "Aq", "LCP"),
               func = fModel)


  and proceeded from there; seemed to work fine.