Hello, Try the following.
fit <- nls(log(proc) ~ k + a*exp(b*cls), data = bline, start = c(k = 1, a = 1, b = 1))
summary(fit) plot(fitted(fit), log(bline$proc)) # Seems nice Hope this helps, Rui Barradas Em 23-04-2013 13:05, catalin roibu escreveu:
Hello all! I have a problem to use a biexponential regression model: I use this code: n3<-nls(proc~SSbiexp(cls,a,b,c,d),data=bline) and this is the error message: Error in nls(y ~ cbind(exp(-exp(lrc1) * x), exp(-exp(lrc2) * x)), data = xy, : singular gradient My data is like this: structure(list(proc = c(387.177462830167, 508.090511433077, 321.836817656365, 151.226805860727, 150.885315536942, 86.2895998400175, 56.3215592398958, 39.5044440630984, 25.5703078997907, 7.33494872198676), cls = c(0.25, 0.5, 0.75, 1, 1.5, 2, 2.5, 3, 3.5, 4)), .Names = c("proc", "cls" ), row.names = c("0.25", "0.5", "0.75", "1", "1.5", "2", "2.5", "3", "3.5", "4"), class = "data.frame") Thank you!
______________________________________________ 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.