Re: [R] Optim seems not to work properly in foreach

2013-06-06 Thread Simon Zehnder
Hi Ilai, after you sent this message I tried your code as well and it worked. As a result, I reconsidered the code written by me and of course also found the error in my function simulateEKOP. So for other people assuming errors or ill behavior in base functions: Forget it: these functions are

[R] Optim seems not to work properly in foreach

2013-06-03 Thread Simon Zehnder
Hi guys, I am working now for several years in R and I would say I manage things pretty easily, but with the foreach loop I have my problems. I call for a simulation a double foreach loop and this works fine. Inside the second loop (which I plan to parallelize later on) I call Rs

Re: [R] Optim seems not to work properly in foreach

2013-06-03 Thread ilai
On Mon, Jun 3, 2013 at 11:37 AM, Simon Zehnder szehn...@uni-bonn.de ... [Some not minimal, self contained, reproducible code]... Data simulation and thecreation of startpar works fine, but the parameters in res$par are always the start parameters. If I run the same commands directly on the