Skip to content

Parameter names in nls()

2 messages · Mark Payne, 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, a, b),data=data.frame(data.x,data.y),
     start=list(a=0, b=0),trace=TRUE,control=nls.control(tol=1e-8))
On Tue, 22 Jul 2008, Mark Payne wrote:

            
Note that you are quoting a comment about a different function in a long 
obsolete version of R, with a very different interface.  That's called 
'clutching at straws'.