Home > matlab > evaluate_posterior_kernel.m

evaluate_posterior_kernel

PURPOSE ^

Evaluate the prior density at parameters.

SYNOPSIS ^

function lpkern = evaluate_posterior_kernel(parameters,llik)

DESCRIPTION ^

 Evaluate the prior density at parameters.

 INPUTS
    o parameters  a string ('posterior mode','posterior mean','posterior median','prior mode','prior mean') or a vector of values for 
                  the (estimated) parameters of the model.
    
    
 OUTPUTS
    o lpkern      [double]  value of the logged posterior kernel.
    
 SPECIAL REQUIREMENTS
    None

 REMARKS
 [1] This function cannot evaluate the prior density of a dsge-var model...
 [2] This function use persistent variables for the dataset and the description of the missing observations. Consequently, if this function 
     is called more than once (by changing the value of parameters) the sample *must not* change.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function lpkern = evaluate_posterior_kernel(parameters,llik)
0002 % Evaluate the prior density at parameters.
0003 %
0004 % INPUTS
0005 %    o parameters  a string ('posterior mode','posterior mean','posterior median','prior mode','prior mean') or a vector of values for
0006 %                  the (estimated) parameters of the model.
0007 %
0008 %
0009 % OUTPUTS
0010 %    o lpkern      [double]  value of the logged posterior kernel.
0011 %
0012 % SPECIAL REQUIREMENTS
0013 %    None
0014 %
0015 % REMARKS
0016 % [1] This function cannot evaluate the prior density of a dsge-var model...
0017 % [2] This function use persistent variables for the dataset and the description of the missing observations. Consequently, if this function
0018 %     is called more than once (by changing the value of parameters) the sample *must not* change.
0019 
0020 % Copyright (C) 2009 Dynare Team
0021 %
0022 % This file is part of Dynare.
0023 %
0024 % Dynare is free software: you can redistribute it and/or modify
0025 % it under the terms of the GNU General Public License as published by
0026 % the Free Software Foundation, either version 3 of the License, or
0027 % (at your option) any later version.
0028 %
0029 % Dynare is distributed in the hope that it will be useful,
0030 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0031 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0032 % GNU General Public License for more details.
0033 %
0034 % You should have received a copy of the GNU General Public License
0035 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
0036 
0037 [ldens,parameters] = evaluate_prior(parameters);
0038 if nargin==1
0039     llik = evaluate_likelihood(parameters);
0040 end
0041 lpkern = ldens+llik;

Generated on Mon 21-May-2012 02:42:43 by m2html © 2005