Page 1 of 1

Marginal Data Density

PostPosted: Tue Oct 09, 2012 8:32 pm
by MatlabNerd
Dear All,

I was conducting a model comparison using Dynare. I am following the same comparison analysis proposed by An and Schorfheide (2007). Hence, I am trying to compare different models using the log of the marginal data density (for example, as reported in Tables 4,5, and 6). Using the estimation command in Dynare, I get (after the posterior maximization) this result:
Log data density [Laplace approximation] is -825.875694
This one is the marginal data density (The marginal data density is calculated as the integral of the likelihood function with respect to the prior density of the parameters), isn't it?
Is it calculated as the one reported in formula (47) of An and Schorfheide (2007)? Or is it given by a different formula?

Thanks very much for your help and support!

MatlabNerd :shock:

Re: Marginal Data Density

PostPosted: Thu Oct 18, 2012 10:13 am
by Lara
Hi,
I actually have the same doubt. Is the log data density computed by Dynare the same as the marginal data density? The latter is obtained by integrating the product of the likelihood function and the prior density over the parameters, i.e. p(Y) = \int L(theta|Y)p(theta)dtheta.

Thanks in advance!

Best,

Re: Marginal Data Density

PostPosted: Fri Mar 07, 2014 8:48 am
by yaliallen
sorry,but...................how to see the log data sensity :oops:
what is the command?
yaliallen

Re: Marginal Data Density

PostPosted: Fri Mar 07, 2014 10:42 pm
by costa
Hi,
Usually it appears after the estimation, you donĀ“t need an additional command.

Re: Marginal Data Density

PostPosted: Fri Mar 07, 2014 11:42 pm
by costa
Here is an example:


ESTIMATION RESULTS

Log data density is -1530.312695.


parameters
prior mean post. mean 90% HPD interval prior pstdev

h 0.500 0.8981 0.8668 0.9287 beta 0.2000
phi_L 0.750 0.1810 0.1206 0.2359 beta 0.1000
xi_L 0.500 0.1394 0.0003 0.2796 beta 0.2500
eta_C 0.500 0.2751 0.1313 0.4190 invg 5.0000
eta_I 0.500 0.3149 0.1229 0.5124 invg 5.0000
S_I 5.000 5.2423 3.6382 6.7151 invg 1.5000
phi_Hd 0.750 0.2352 0.1670 0.3021 beta 0.1000
xi_Hd 0.500 0.1380 0.0009 0.2801 beta 0.2500
phi_Hf 0.750 0.5095 0.3436 0.6987 beta 0.1000
xi_Hf 0.500 0.2280 0.0004 0.5000 beta 0.2500
phi_F 0.750 0.2878 0.2023 0.3749 beta 0.1000