Re: [R] Robust nonlinear regression - better example

2004-02-02 Thread Spencer Graves
1. The question of "linear" vs. "nonlinear" means "linear in the parameters to be estimated. All the examples you have given so far are linear in the parameters to be estimated. The fact that they are nonlinear in "x" is immaterial. 2. With this hint and the posting guide "http:

[R] Robust nonlinear regression - better example

2004-02-02 Thread cstrato
Dear all Here is a hopefully better example with regards to nonlinear robust fitting: # fitting a polynomial: x <- seq(-10,10,0.2) y <- 10*x + 4*x*x - 2*x*x*x plot(x,y) z <- jitter(y,amount=300) plot(x,z) df <- as.data.frame(cbind(x,z)) nf <- nls(z ~ a*x + b*x*x + c*x*x*x, data=df, + sta