Home > . > initial_estimation_checks.m

initial_estimation_checks

PURPOSE ^

SYNOPSIS ^

function initial_estimation_checks(xparam1,gend,data)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function initial_estimation_checks(xparam1,gend,data)
0002 global dr1_test bayestopt_ estim_params_ options_ oo_ M_
0003 
0004 nv = size(data,1);
0005 if nv-size(options_.varobs,1)
0006     disp(' ')
0007     disp(['Declared number of observed variables = ' int2str(size(options_.varobs,1))])
0008     disp(['Number of variables in the database   = ' int2str(nv)])
0009     disp(' ')
0010     error(['Estimation can''t take place because the declared number of observed' ...
0011       'variables doesn''t match the number of variables in the database.'])
0012 end
0013 if nv > M_.exo_nbr+estim_params_.nvn
0014     error(['Estimation can''t take place because there are less shocks than' ...
0015       'observed variables'])
0016 end
0017 r = rank(data);
0018 if r < nv
0019     error(['Estimation can''t take place because the data are perfectly' ...
0020         ' correlated']);
0021 end
0022 
0023 fval = DsgeLikelihood(xparam1,gend,data);
0024 if exist(dr1_test)
0025     disp(dr1_test)
0026     switch(dr1_test(1))
0027         case 1
0028             error('The steady state can''t be found');
0029         case 2
0030             error(['Estimation can''t take place because there are an infinity of' ...
0031                     ' stable solutions']);
0032         case 3
0033             error(['Estimation can''t take place because there is no stable' ...
0034                     ' solution']);
0035         case 4
0036             error(['Estimation can''t take place because of singularity in Kalman' ...
0037                     ' filter']);
0038         otherwise
0039     end
0040 end

Generated on Fri 16-Jun-2006 09:09:06 by m2html © 2003