help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lsqnonlin?


From: Michael Creel
Subject: Re: lsqnonlin?
Date: Tue, 3 Apr 2007 12:30:36 +0200

I looked over the NLS code in Octave Forge, and I think that a modification is in order. NLS is a specific case of GMM estimation. It would be possible to write a nls_estimate function that takes the model name as an argument, where the model would return the conditional mean of the dependent variable as a function of the parameter vector. Then the moment conditions that define the NLS estimator would be computed and used to feed to the GMM estimating routine, gmm_estimate or gmm_results. The advantage of this is that t-statistics, p-values, and goodness of fit statistics would automatically be available. If you're interested, please check out gmm_example in the Econometrics package in O-F. It would be easy to make an NLS routine give similar results. M.

On 4/3/07, Michael Creel <address@hidden> wrote:
There's an NLS routine in Octave Forge, econometrics package. It looks like I might need to give it a little attention, though:

octave:1> nls_example
warning: unrecognized escape sequence `\N' -- converting to `N'

======================================================
BFGSMIN final results

Used numeric gradient

------------------------------------------------------
STRONG CONVERGENCE
Function conv 1  Param conv 1  Gradient conv 1
------------------------------------------------------
Objective function value 59.1421
Stepsize 0.000119048
49 iterations
------------------------------------------------------

 param    gradient  change
  1.0684   0.0000   0.0000
  1.8487  -0.0000   0.0000
  3.0178   0.0000  -0.0000

NLS estimation example
octave:2>          


On 4/3/07, Muthiah Annamalai <address@hidden> wrote:
On Mon, 2007-04-02 at 09:33 -0700, skenny wrote:
> hi,
>
> i am also trying to run a program (in octave) that uses lsqnonlin and have
> had a hard time fiinding a way to do it. i'm wondering if anyone has
> actually tried to run this levmar program within octave? or if anyone has
> found another way of doing it (?)
>
> thanks!
> sarah
>

Maybe you should replace the code of lsqnonlin whatever it is, with
calls to the function leasqr() for the LevMar process fits. LevMar
curve fit on leasqr() worked for me.

I have no idea what is lsqnonlin, and I think you probably have the
source code for lsqnonlin.

Hope it helps.
Muthu

PS: I know Im repeating much of what Bill said, but....

_______________________________________________
Help-octave mailing list
address@hidden
https://www.cae.wisc.edu/mailman/listinfo/help-octave



reply via email to

[Prev in Thread] Current Thread [Next in Thread]