marginal likelihood code

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.

marginal likelihood code

Postby yaliallen » Fri Mar 07, 2014 9:00 am

I know it is a stupid question...but I really can not find the marginal data density code in manual or user guide.is it in the "estimate"?I don not think it works when I code "marginal_density()" after "estimate"command. :oops:
I will be really grateful if someone can give a example.
btw,Is it the same as marginal likelihood?I believe many people had compared two models by this index,really need a help!
yaliallen
yaliallen
 
Posts: 3
Joined: Thu Sep 19, 2013 9:45 am

Re: marginal likelihood code

Postby jpfeifer » Sat Mar 08, 2014 11:29 am

The log marginal data density will be computed automatically by the estimation-command if you use Bayesian estimation. As written in the manual, it is stored in oo_.MarginalDensity.
Yes, this it the statistic used for model comparison and is also referred to a the marginal likelihood or model evidence.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: marginal likelihood code

Postby yaliallen » Tue Mar 18, 2014 9:51 am

jpfeifer wrote:The log marginal data density will be computed automatically by the estimation-command if you use Bayesian estimation. As written in the manual, it is stored in oo_.MarginalDensity.
Yes, this it the statistic used for model comparison and is also referred to a the marginal likelihood or model evidence.


thank you mr pfeifer for helping me. but i cannot find where to see this output. if i should type a additional code "oo_.MarginalDensity" under estimation? I try this,but it shows:
??? Reference to non-existent field 'MarginalDensity'.

Error in ==> LJWSIGEQZ at 1805
oo_.MarginalDensity;

Error in ==> dynare at 120
evalin('base',fname) ;

or
Starting Dynare (version 4.3.3).
Starting preprocessing of the model file ...
ERROR: LJWSIGEQZ.mod:127.69-71: syntax error, unexpected NAME

if not,as http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=4121&p=14435&hilit=oo_marginal#p14435 said,I didn't say the same result with my code. :shock:
really want to know what goes wrong..Thank u!
attachments is my code and data
Attachments
LJWSIGEQZ.mod
(3.08 KiB) Downloaded 55 times
data07.m
(294 Bytes) Downloaded 53 times
yaliallen
 
Posts: 3
Joined: Thu Sep 19, 2013 9:45 am

Re: marginal likelihood code

Postby jpfeifer » Tue Mar 18, 2014 11:11 am

The marginal data density is a Bayesian concept. You are estimating the model with ML and not with Bayesian techniques. That won't work.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

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