On 17.11.2024 12:37, Alecos Papadopoulos wrote:
Hi Marcin, thanks. It is a good thing that gretl's functionality has
so much expanded that one cannot really remember (or encounter) the
whole of it.
I tried both approaches (for a single unknown). The non-linear
function had the unknown in several places at the same time, either
exponentiated, or as an exponent itself, or in logs, or in the
denominator.
REPORT
1. Run both methods 10,000 times on the same data (two series ranging
in (0,1)).
2. When they both succeed for the same data (see next for when they
don't), they provide identical results (max abs difference 1.8256e-007).
3. fzero issues: with the fzero function (where i provided only a
single 0.01 initial value), the limitation I see is that we cannot
constraint the value of the argmin (and I need it to be in (0,1) for
example).
Hmm, taken from help:
<hansl>
x = fzero(sin(x), {3.1, 3.2})
eval x
x = fzero(sin(x), {3.0, 3.1})
eval x
</hansl>
So the error generated for the second example confirms that constraints
on x works fine :-)
Marcin