Re: [R] How can I fixe convergence=1 in optim

2010-09-06 Thread Ben Bolker
[forwarding back to r-help for archiving/further discussion] On 10-09-05 08:48 PM, Sally Luo wrote: Prof. Bolker, Thanks for your reply and the helpful info. I still have a few questions. 1. I also tried to use different methods other than BFGS without changing their default

[R] How can I fixe convergence=1 in optim

2010-09-04 Thread Sally Luo
Hi R users, I am using the optim funciton to maximize a log likelihood function. My code is as follows: p-optim(c(-0.2392925,0.4653128,-0.8332286, 0.0657, -0.0031, -0.00245, 3.366, 0.5885, -0.8, 0.0786,-0.00292,-0.00081, 3.266, -0.3632, -0.49,0.1856, 0.00394,

Re: [R] How can I fixe convergence=1 in optim

2010-09-04 Thread David Winsemius
On Sep 4, 2010, at 4:18 PM, Sally Luo wrote: Hi R users, I am using the optim funciton to maximize a log likelihood function. My code is as follows: p-optim(c(-0.2392925,0.4653128,-0.8332286, 0.0657, -0.0031, -0.00245, 3.366, 0.5885, -0.8, 0.0786,-0.00292,-0.00081,

Re: [R] How can I fixe convergence=1 in optim

2010-09-04 Thread Peng, C
To change the default maximum number of iterations (mxit =100 for derivative based algorithm), add mxit = whatever number you want. In most cases, you need a very good initial value! This is a real challenge in using optim(). Quite often, if the initial values is not well selected, optim() can

Re: [R] How can I fixe convergence=1 in optim

2010-09-04 Thread Ben Bolker
Peng, C cpeng.usm at gmail.com writes: To change the default maximum number of iterations (mxit =100 for derivative based algorithm), add mxit = whatever number you want. that's maxit i.e. optim(...,control=list(maxit=...)) __