[R] Sometimes having problems finding a minimum using optim(), optimize(), and nlm() (while searching for noncentral F parameters)

2005-10-11 Thread David Duffy
Ken Kelley [EMAIL PROTECTED] wrote I have a problem that I have been unable to determine either the best way to proceed and why the methods I'm trying to use sometimes fail. I'm using the pf() function in an optimization function to find a noncentrality parameter that leads to a specific

[R] Sometimes having problems finding a minimum using optim(), optimize(), and nlm() (while searching for noncentral F parameters)

2005-10-10 Thread Ken Kelley
Hi everyone. I have a problem that I have been unable to determine either the best way to proceed and why the methods I'm trying to use sometimes fail. I'm using the pf() function in an optimization function to find a noncentrality parameter that leads to a specific value at a specified

Re: [R] Sometimes having problems finding a minimum using optim(), optimize(), and nlm() (while searching for noncentral F parameters)

2005-10-10 Thread Gabor Grothendieck
I haven't look at your code but here a couple of things to try: 1. try using the square of the difference rather than the absolute value as your objective so that your objective is differentiable. 2. your objective function may be relatively flat in which case it will be difficult to get a