## I want to find the 1st and the 2nd deriatives of a likelihood function?

Dear all,

I want to find the Derivatives (1st and 2nd) of a likelihood function? (Econometrics)?

the formal model (linear factor model):
Y0 = mu0 + a0*theta + eps0
Y1 = mu1 + a1*theta + eps1
...
YM = muM + aM*theta + epsM

The likelihood function:
L(Yi | a , sigma) = ( (2pi)^M * det sigma)^(-1/2) * exp(-1/2 (Yi-E|Yi|)^T * sigma^-1 * (Yi-E[Yi]))

And the log-likelihood that has to be minimized
- (sum from i=1 to N) log (L(Yi | a , sigma) = (log of fct above) = - N * log( ( (2*pi)^M det sigma)^(-1/2)) + (sum from i=1 to N) * ½ * (Yi – E[Yi])^T * sigma^(-1) * (Yi – E[Yi])
key:
Yi - the dependent variable
sigma - the variance/covariance matrix.
theta - independent variable
M - number of measurements.
T - number of periods.

[ Yk ]
sigma (matrix) = V[ Yl ] = (3x3) =
[ Ym]

(first row) [ (sigma.theta^2 + sigma.epsk^2) (.) (.) ]
(second row) [ (a.l sigma.theta^2) (a.l^2 sigma.theta^2 + sigma.epsl^2) (.) ]
(third row) [ (a.m sigma.theta^2) (al am sigma.theta^2) (a.m^2 sigma.theta^2 + sigma.epsm^2) ]

So I want to find the Derivatives (1st and 2nd) of a likelihood function?

Thank you so much in advance!!!
Have a wonderful week,
Gil