On Sat, 23 Mar 2019, Olasehinde Timmy wrote:
Dear professors
Please, I would like to know how to use a matrix function in maximum
likelihood estimation of the below specifications ( asterik variables are
function of parameters)
series e1 = y - y*
series e2 = x - x*
series v1 = var(e1)
series v2 = var(e2)
series v12 = cov(e1,e2)
matrix U = {e1;e2}
matrix V = {v1,v12;v12,v2}
mle ll = -N/2*log(2π) - 1/2*log|V| - 1/2*U'*inv(V)*U
Is the above specifications possible? Please kindly help.
Presumably v1, v2 and v12 should be scalars, not series, and the
matrix V should be 2 x 2?
For e1 and e2 both series, matrix U = {e1;e2} will not work. You
can use {e1} and {e2} to convert the series to matrices, and the
operator '~' or '|' to stick them together in whatever way makes
sense.
But what do you intend for the dimensions of U? Note that it (or its
transpose) must be conformable for multiplication into inv(V), and
the "ll" result must be either a scalar or a vector of length equal
to the number of observations.
Allin Cottrell