Hi!

Is there a command in Dynare for calculation of marginal density of ANY data?

For example, I estimated the model with data, that consist of 2 parts: Data=Data1+Data2. So Dynare provides me marginal data density p(Data|model) in oo_.MarginalDensity. I need p(Data1|model). Such thing is used for calculation “conditional marginal likelihood” (M. Brzoza-Brzezina, M.Kolasa “Bayesian Evaluation of DSGE Models with Financial Frictions”, https://ideas.repec.org/p/wse/wpaper/71.html).

If no, could anyone suggest an easiest way to calculate p(Data1|model)?

As I can understand, I need to calculate p(Data1 |model)=\int p(Data1| \theta, model) p( \theta) d\theta. For example, could I use Laplace approximation p(Data1|model) = \frac{(2\pi)^{N/2} p(Data1| \theta^{\star},model) p(\theta^{\star})}{g(\theta^{\star})^{1/2}}, where \theta^{\star} the mode value of estimated parameters?

I thank you in advance.