Path: news.mathworks.com!not-for-mail From: <HIDDEN> Newsgroups: comp.soft-sys.matlab Subject: Re: Estimation Problem in Newton Method Date: Thu, 17 Jun 2010 17:30:27 +0000 (UTC) Organization: The MathWorks, Inc. Lines: 21 Message-ID: <hvdm3j$70q$1@fred.mathworks.com> References: <hv4vse$9h1$1@fred.mathworks.com> <hv6foa$3ho$1@fred.mathworks.com> <hvct0c$n90$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-05-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1276795827 7194 172.30.248.35 (17 Jun 2010 17:30:27 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Thu, 17 Jun 2010 17:30:27 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1187260 Xref: news.mathworks.com comp.soft-sys.matlab:645850 "Antony zerrar" <zerrar@yahoo.com> wrote in message <hvct0c$n90$1@fred.mathworks.com>... > Can I ask you how would it be possible to change this model to fsolve or fmincon? I don't see why you are using matlab for this problem at all, Antony. Using elementary calculus you can easily determine that in the upper half of the x1,x2 plane (x2 > 0) your function, f(x1,x2), attains a local maximum at: x1 = 1/11*sum(d) = mean(d) x2 = 1/3*sum((d-mean(d)).^2) = 10/3*var(d) That is where both components of the gradient, m and s, become zero. A 'surf' plot in the neighborhood of this point should make this evident. In the lower half of the x1,x2 plane (x2 < 0) there is no local maximum or minimum as the function varies from minus infinity to plus infinity throughout that half-plane. Newton's method (properly done,) fsolve, and fmincon should all find that solution easily if given an appropriate initial estimate, but why do it that way when the solution is so easily found by hand? I am assuming here, based on your earlier statement, that your function is: f(x1,x2) = -3/2*log(abs(x2)) - sum((d-x1)^2)/(2*x2) where d = [-1 5 2 -2 4 3 -3 6 3 1 -2]. Roger Stafford