Page 1 of 1
Log-likelihood function
Posted:
Thu Jun 26, 2008 4:45 pm
by Anna
I have a linear stochastic model. As I understand, the Dynare solves it, runs Kalman filter and estimates it.
Please, could anyone explain how
1)I can get a value of log-likelihood function at a pre-specified value of the parameter.
2) I can get a value of log-likelihood function at the ML estimate (I know, it's printed on the screen, but I wonder if it is stored somewhere)
Thank You!
Posted:
Mon Jun 30, 2008 12:45 pm
by p.gelain
Hi Anna
I did not get your first point. As for the second one, both the Laplace approximation and the harmonic mean are stored in
oo_.MarginalDensity
Paolo
Posted:
Mon Jun 30, 2008 6:01 pm
by Anna
Thanks!
in question 1) I meant the following:
say, I'm running ML estimation. The parameter I want to estimate is theta. I wonder if I can calculate the value of likelihood function L(theta_0) for some fixed theta=theta_0.
I need it for two things: a) for a testing of complex hypothesis using LR statistic for testing H_0:theta=theta_0. (then I need the likelihood at theta_0 and the likelihood at theta_ML); b) to visualize the likelihood around the ML estimate in order to make sure that the maximum is achieved and the the function look regular.
Posted:
Tue Jul 01, 2008 9:02 am
by p.gelain
I think that you need just to estimate firs the model without fixing say theta and you will obtain the loglik that you can find stored in the oo_.MarginalDensity. Then just fix theta=theta_0. You can do that after you have declared your parameters on the top of the code and before declaring the model. Then run again the estimation and you will obtain the loglik you are searching for (L(theta_0)). At this point you have the two logliks and you may compute the LR statistic...As for the visualization of the likelihood I don't know....
Paolo
Posted:
Tue Jul 01, 2008 9:48 am
by reubenpjacob
for visualization, the mode-check command should suffice, right?
Posted:
Tue Jul 01, 2008 9:50 am
by p.gelain
I think so....mode_check should work...thanks Reuben
Paolo