Re: [Rd] Parameter names in nls()

2008-07-22 Thread Prof Brian Ripley
They are not 'stripped': nothing says that because you named the starting value that other values will be named. You are misusing nls(): the documented way would be to have data.x <- 1:50 data.y <- pi*data.x + rnorm(50,sd=20) fitting.fn <-function(x, a, b) a + b*x nls(data.y ~ fitting.fn(data.x

[Rd] Parameter names in nls()

2008-07-22 Thread Mark Payne
Dear R-dev, I have been having some problems with regards to names in the parameter vector being stripped when passed to the objective function when using nls(). I was relieved to find that it wasn't me, and that this behaviour has previously been reported in optim() also. See eg https://stat.ethz