I'm trying to fit a sigmoidal curve to several data sets, so I'm using this script: plotPoints (MS ~ Day, data = dataT1)
MST1 <- nls(y ~ a + ((b - a)/(1 + exp(-c * (x - d)))),
data = dataT1,
start = list(a = min(dataT1$y),
b = max(dataT1$y),
c = 1, d = median(dataT1$x)),
trace = TRUE, algorithm = "port")
overview(MST1)
plotfit(MST1, smooth = TRUE)
The problem that I am having is that with several data groups the script works for me but with others not, giving me the following error:
Error in nls(Nabs ~ a + ((b - a)/(1 + exp(-c * (Dia - d)))), data = dataT1NPK, :
Convergence failure: false convergence (8)
and
Error in nls(Kabs ~ a + ((b - a)/(1 + exp(-c * (Dia - d)))), data = dataT1NPK, :
Convergence failure: iteration limit reached without convergence (10)
What could this be? I leave one of the database that gives me error: link
Thank you very much!