Re: [R] Scaling problem in optim()

2011-08-15 Thread Ravi Varadhan
There is an error in your call to `optim'. The`lower' bound is incorrect: lower=c(rep(-1,n),1e-5,1e-5,1e5) This should be: lower=c(rep(-1,n),1e-5,1e-5,1e-5) I am not sure if this fixes the problem, but it is worth a try. I do not understand your scaling. From the lower and upper bounds it se

Re: [R] Scaling problem in optim()

2011-08-15 Thread Ben Bolker
Rebekka Schibli gmx.ch> writes: > > I am using the function optim and I get the error message ABNORMAL_TERMINATION_IN_LNSRCH. Reason for this > could be a scaling problem. Thus, I used parscale in order to scale the parameters. But I still have the > error message. For example, with parscale=c(r

[R] Scaling problem in optim()

2011-08-14 Thread Rebekka Schibli
I am using the function optim and I get the error message ABNORMAL_TERMINATION_IN_LNSRCH. Reason for this could be a scaling problem. Thus, I used parscale in order to scale the parameters. But I still have the error message. For example, with parscale=c(rep(1,n), 0.01,1,0.01): return(optim(c(