[R] Optimization issue - Solution converges for any initial value

2016-09-30 Thread Paul Gilbert
ent is zero because the objective function is flat. This would normally be considered a "user error" but perhaps John's newer code can catch it? Paul Date: Thu, 29 Sep 2016 14:53:08 -0500 From: Narendra Modi To: "r-help@r-project.org" Subject: [R] Optimizatio

Re: [R] Optimization issue - Solution converges for any initial value

2016-09-29 Thread ProfJCNash
I haven't tried running your code, but a quick read suggests you should 1) set up the input data so your code can be run with source() without any preprocessing. 2) compute the function for several sets of parameters to make sure it is correct. Maybe create a very simple test case you can more o

[R] Optimization issue - Solution converges for any initial value

2016-09-29 Thread Narendra Modi
I have put together a R snippet wherein I am trying to get optimum values for which error is minimized. The error is the difference between two matrices. Every time I run the below code, I don't see any optimization happening as in the final answer is the same as the initial estimate regardless of