Log-likelihood function

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Log-likelihood function

Postby Anna » Thu Jun 26, 2008 4:45 pm

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!
Anna
 
Posts: 2
Joined: Thu Jun 26, 2008 4:38 pm

Postby p.gelain » Mon Jun 30, 2008 12:45 pm

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
p.gelain
 
Posts: 61
Joined: Wed Jul 11, 2007 9:13 pm
Location: Norges Bank

Postby Anna » Mon Jun 30, 2008 6:01 pm

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.
Anna
 
Posts: 2
Joined: Thu Jun 26, 2008 4:38 pm

Postby p.gelain » Tue Jul 01, 2008 9:02 am

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
p.gelain
 
Posts: 61
Joined: Wed Jul 11, 2007 9:13 pm
Location: Norges Bank

Postby reubenpjacob » Tue Jul 01, 2008 9:48 am

for visualization, the mode-check command should suffice, right?
reubenpjacob
 
Posts: 133
Joined: Fri Oct 06, 2006 3:23 pm
Location: Reserve Bank of New Zealand

Postby p.gelain » Tue Jul 01, 2008 9:50 am

I think so....mode_check should work...thanks Reuben

Paolo
p.gelain
 
Posts: 61
Joined: Wed Jul 11, 2007 9:13 pm
Location: Norges Bank


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 8 guests