[R] nls fitting problems (singularity)

Peter Dalgaard p.dalgaard at biostat.ku.dk
Wed Jun 30 16:04:00 CEST 2004


Douglas Bates <bates at stat.wisc.edu> writes:

> Often when nls doesn't converge there is a good reason for it.
> 
> I'm on a very slow internet connection these days and will not be able
> to look at the data myself but I ask you to bear in mind that, when
> dealing with nonlinear models, there are model/data set combinations
> for which there are no parameter estimates.


In this particular case, the model describes a curve consisting of two
line segments that meet at the point (b,d)

> > : nls(y~d+(x-b)*c1*(x-b<0)+(x-b)*c2*(x-b>=0), data=df2,

Now if b is between the two smallest x, you can diddle b, c1, and d in
such a way that the value at x1 is constant. I.e. the model becomes
unidentifiable. Putting trace=T suggests that this is what happens in
this example.


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list