Page 1 of 1

A problem with model_comparison

PostPosted: Sun May 08, 2011 1:11 pm
by pb0322
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

Re: A problem with model_comparison

PostPosted: Tue May 24, 2011 10:17 am
by SébastienVillemot
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.