Marginal density of data

How to calculate the marginal density of data with dynare? What is the code?

After running estimation, Dynare will display both the Marginal Data Density from the Laplace approximation and the one based on the modified harmonic mean estimator.

really? why i never see that? can you give me a example of the file? thank you very much, professor.

Run the fs2000.mod from the examples-folder. You will see in the command window after mode-finding

Log data density [Laplace approximation] is 1186.624917.

and after the MCMC

Estimation::marginal density: I'm computing the posterior mean and covariance...  Done!
Estimation::marginal density: I'm computing the posterior log marginal density (modified harmonic mean)... Done!


ESTIMATION RESULTS

Log data density is 1186.361841.

Results are stored in oo_.MarginalDensity

thank you very much, professor.

Professor, I’m sorry to disturb you again. I run your example well yestoday, but why I cannot realize that with my own file? Could you help me check the file? Gratefully.lysi.mod (2.0 KB)
dataRBC.zip (10.5 KB)

Please use the most recent stable Dynare version.

Before continuing with this, fix your model:

  1. Your model is stochastically singular. You cannot observe all components of the budget constraint.
  2. You do not correctly take parameter dependence into account.
    Please consult Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”

Thank you. Professor.