A problem with model_comparison

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.

A problem with model_comparison

Postby pb0322 » Sun May 08, 2011 1:11 pm

Dear all,
Does anyone know how to use function model_comparison to compute posterior odds ratios? I followed the method tanya advised as followed:

nomodels=2;
file_names = cell(nomodels,1);
file_names{1}='name1';
file_names{2}='name2';

model_priors = [1;1];
options_.model_comparison_approximation='Laplace';
PosteriorOddsTable = model_comparison(file_names,model_priors);

but the system returns:

??? Input argument "options_" is undefined.

Error in ==> model_comparison at 51
if isfield(options_,'model_comparison_approximation')

Error in ==> comparison at 7
model_comparison(file_names,model_priors);

My Dynare edition is 4.2.0. I read the code of function model_comparison and found that this function needs five input, which are ModelNames,ModelPriors,oo,options_,fname. How to define oo and fname?

Many thanks. :D
Bob
pb0322
 
Posts: 2
Joined: Mon Mar 14, 2011 6:38 am

Re: A problem with model_comparison

Postby SébastienVillemot » Tue May 24, 2011 10:17 am

The "model_comparison" command has a simpler syntax than that, see the reference manual in the "Estimation" section.

For example, you could simply write:

Code: Select all
model_comparison name1(0.3) name2(0.7);


The 0.3 and 0.7 figures reflects your a priori beliefs on the respective models.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 12 guests