# NOT RUN {
set.seed(1)
x <- rep(1:300, each=2)
a <- 8; b <- 0.05; c <- -1e-3
y <- a + b*x + c*x^2 + rnorm(length(x), sd=0.1)
d <- cbind(x,y)
# a converged example:
ans <- f.quad(d, start=list(a = 7, b = 0.02, c = 1e-5),
plus_minus=10, n.start=10, msg=FALSE)
summary(ans$nls.model)
# }
Run the code above in your browser using DataLab