Model comparison with dynare 4.0.3

i’m trying to get the posterior odds to compare two models, how can can i compare two models using dynare?
i have tried the code: [model_comparison(model_comparison_approximation=laplace) model name1, model name2;];but it is not working, and it gives the following error:
(ERROR: model name.mod:85.17-46: syntax error, unexpected MODEL_COMPARISON, expecting MODEL_COMPARISON_APPROXIMATION or NOPRINT or PRINT.), and when i use (MODEL_COMPARISON_APPROXIMATION) instead of (model_comparison), it gives the following error:
(??? Error: File: model name.m Line: 186 Column: 62 The expression to the left of the equals sign is not a valid target for
an assignment.)
Can any one please provide me with the right code and process to achieve my target?

Hi, Did you try the example given in this thread?
Stéphane.

i have tried this thread; which is a code written in Matlab to run in Matlab, not in Dynare; but it is not working too, and gives the following error:
??? Undefined function or method ‘model_comparison’ for input arguments of
type ‘cell’.

Error in ==> CompareModels at 8
PosteriorOddsTable = model_comparison(file_names,model_priors);].

i’ve tried the code posted by MichelJuillard » Fri Sep 22, 2006 1:29 pm , on Rabanal and Rubio (2003) example, and also the code provided by MichelJuillard » Fri Sep 22, 2006 8:41 pm, but both are not working.

i want to get my model comparison based on the posterior results, how can i do that??

Ok. This bug is fixed in the snapshot version of dynare.

Stéphane.