Thanks Sven, that was helpful.
As regards Suspicion 1, unfortunately my restrictions are heavily
cross-equation, and non-linear in ways that transforming the variables
won't help ... also, I do not care much about testing them. I think the
reason non-linear restrictions are not supported in a system is the
issue of testing them. How about being able to impose them while losing
the ability to test them? Let's say I have complete confidence in my
theoretical model...!
As regards Suspicion 2, my "solution" makes the definition of the Kalman
matrices a bit too long and a little confusing especially when the
restrictions are many and more complicated. The issue is that the mle
takes the likelihood expression from inside the Kalman bundle, this is
why I think It will not work if I try to define a "helper variable" as
you write directly inside the mle command block, as we often do in other
cases... but maybe it will work regardless. Maybe the following will work
<hansl>
scalar a11 =0.2
scalar a12 = 0.4
scalar a13 = a11/a12
matrix F' = {a11,a12,a13} # instead of defining matrix F' = {a11, a12,
a11/a12}
...
bundle KF = ksetup(y,H,F,Q)
mle logl = ERR ? NA : KF.llt
.....
KF.statemat[1,1] = a11
KF.statemat[2,1] = a12
KF.statemat[3,1] = a11/a12
#or alternatively
KF.statemat[3,1] = a13
scalar a13 = a11/a12
#end of alternatively
ERR = kfilter(&KF)
params a11 a12
end mle --hessian
</hansl>
Alecos Papadopoulos PhD
Athens University of Economics and Business
web:
alecospapadopoulos.wordpress.com/
skype:alecos.papadopoulos
On 5/1/2020 21:55, Sven Schreiber wrote:
> Am 05.01.2020 um 02:04 schrieb Alecos Papadopoulos:
>> I have the following two suspicions, can somebody please verify/dispel
>> them?
>>
>> 1) In a system of equations, currently I have no way to impose
>> non-linear restrictions on the coefficients (like ratios or products of
>> coefficients, nothing fancier). Right? Wrong?
>
> Yes, I think so. (At least that's the documented state.) Of course if
> you're happy estimating your system with TSLS, then you can pick out the
> equation of interest and you should be able to formulate a restriction
> in this single equation. If you aren't thinking of cross-equation
> restrictions, that is.
> And I guess I don't need to tell you that sometimes you can transfrom
> and redefine your regressors to achieve ratios or stuff like that. If
> that is feasible in your case, then a LR test might also be viable.
>
>>
>> 2) In using the Kalman filter together with maximum likelihood, consider
>> the following detail: say, in the "obsxmat" matrix there exists a
>> coefficient restriction, say a13 = a12/a11
> ...
>> scalar a13 = a12/a11
> ...
>> If my suspicion is right, then I think I have to define the matrix A by
>>
>> matrix A = {a11, a12, a12/a11}
>>
>> so that position a13 is also updated with the MLE estimate.
>>
>> Right? Wrong?
>
> This sounds right, but somehow I'm afraid I don't really get your
> question, because you already seem to have answered it yourself.
> Also, you can have helper variables like a scalar a13 inside your mle
> block, which only serve to express the connections of your parameters,
> without being params of interest themselves directly.
>
> cheers
> sven
> _______________________________________________
> Gretl-users mailing list -- gretl-users(a)gretlml.univpm.it
> To unsubscribe send an email to gretl-users-leave(a)gretlml.univpm.it
> Website:
>
https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/