Thanks for the comments. Yes, I also had segmented and then I went away from that. I can't remember. I've tried using it but I get some sort of strange error. Here's some code ...
pavlu.glm <- glm(Na ~ yield, data=pavludata, family=gaussian) pavlu.seg <- segmented(pavlu.glm, seg.Z=~yield, psi=1000, control=seg.control(display=FALSE)) plot.series <- function() { plot(pavlu.seg) plot(pavlu.seg, add=TRUE, linkinv=TRUE, lwd=2, col=2:3, lty=c(1,3)) lines(pavlu.seg, col=2, pch=19, bottom=FALSE, lwd=2) } jpeg("pavlu-cuttingsystem-segmented.jpg", width = 1000, height = 700, units = "px") plot.series() ## Turn off device driver (to flush output to JPG) dev.off() 1. I don't think I'm doing my plotting right. I'm just not sure how that works with segmented. 2. My error is something about an error in do.call(lines) and that the maximum number of iterations has been reached. Am I missing something with glm or lm? Thanks again. -- View this message in context: http://r.789695.n4.nabble.com/breakpoints-and-nonlinear-regression-tp4303629p4306657.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.