I guess this is elementary and I should be embarrassed, but it seems I
cannot find a way to tell gretl to include what is essentially a
quadratic form in the expression for the log-likelihood contributions
(llc) (1st line in the mle command).
I mean something like the following does not seem to work (N1 and N2 are
series-type)
...
scalar s1 = 1
scalar s2 = 1
scalar c12 = 0.5
matrix S = {s1^2,c12;c12,s2^2}
mle logl = check ? -0.5*ldet(S) - 0.5*qform(q,inv(S)) :NA
matrix q = {N1, N2}
scalar check = (s1>0) && (s2>0) && (abs(c12)<1)
params s1 s2 c12
end mle
...
The above is an example that attempts to estimate the parameters of a
bivariate normal distribution. The expression in the mle command line
attempts to express the log-likelihood at observation level as we do on
paper, hoping that Gretl will treat it as it does with series-type data,
i.e. consider one row of the q- (N x 2) matrix at a time. It seems it
doesn't though.
Of course one can always write out the quadratic explicitly, and then
use series as usual, but for more than two variables involved this is
two complicated, and my case is not just bivariate.
Is there a way to do this compactly?
--
Alecos Papadopoulos
PhD Candidate
Athens University of Economics and Business, Greece
School of Economic Sciences
Department of Economics
https://alecospapadopoulos.wordpress.com/