Hi, I'm trying to fit a not linear model with the nls function to some data. So far this is the best fitting that i found.
download.file("http://dl.dropbox.com/u/29337496/data" , destfile="./data") load("data") plot (x06Veg,y06Pop) nlmod=nls( y06Pop ~ B + A * log(x06Veg) , start = list(A = 1, B = 1 ) ) points(x06Veg , predict(nlmod), col = 2) co <- coef(nlmod) f <- function(x, A, B) {B + A * log(x)} curve(f(x,A=co["A"],B=co["B"]) , add=TRUE) I would like to increase the curvature of the model and check if the residual sum-of-squares decrease. Should i just guess and change the main function (B + A * log(x06Veg)) with another one (e.g. B + A * sqrt(x06Veg)) and re-run or there is a better way? Thanks in Advance Giuseppe -- Giuseppe Amatulli Web: www.spatial-ecology.net [[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.