Re: [R] nlm behaviour and error

2008-06-02 Thread Prof Brian Ripley
It says the value is *missing* (NA), not that the length is wrong. My quess is that term*bexp is NaN, but you have given us no context to go on. On Tue, 3 Jun 2008, Redding, Matthew wrote: Hi R-Gurus, I've been cutting along quite nicely with nlm, until I threw in the following condition in

[R] nlm behaviour and error

2008-06-02 Thread Redding, Matthew
Hi R-Gurus, I've been cutting along quite nicely with nlm, until I threw in the following condition in the function that nlm is minimising: if (((term*bexp) < 0.0001)) { #warning(term*bexp, "=term*bexp",psi,"=psi") theta<-2000 } Now when I run this function anywhere