SSweibull() : Â problems with step factor and singular gradient Hello
I am working with growth data of ~4000 tree seedlings and trying to fit non-linear Weibull growth curves through the data of each plant. Since they differ a lot in their shape, initial parameters cannot be set for all plants. Thatâs why I use the self-starting function SSweibull(). However, I often got two error messages: 1) # Example days <- c(163,168,170,175,177,182,185,189,196,203,211,217,224) height <- c(153,161,171,173,176,173,185,192,195,187,195,203,201) dat <- as.data.frame(cbind(days,height)) fit <- nls(y ~ SSweibull(x, Asym, Drop, lrc, pwr), data = dat, trace=T, control=nls.control(minFactor=1/100000)) Error in nls(y ~cbind(1, -exp(-exp(lrc)* x^pwr)), data = xy, algorithm = âplinearâ, : Â Â Â Â Â Â Â Â Â Â Â Â Â step factor 0.000488281 reduced below `minFactor` of 0.000976562 I tried to avoid this error by reducing the step factor below the standard minFactor of 1/1024 using the nls.control function (shown in the example above). However, this didnât work, as shown in the example (minFactor still the standard). Thus, does nls.control() not work for self-starting functions like SSweibull()? Or is there another explanation? 2) In other cases, a second error message showed up: Error in nls(y ~cbind(1, -exp(-exp(lrc)* x^pwr)), data = xy, algorithm = âplinearâ, : Â Â Â Â Â Â Â Â Â Â Â Â Â singular gradient Is there a way to avoid the problem of a singular gradient? Iâd be very glad about helpful comments. Thanks a lot. Aline [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.