Commit ba889e85 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Preprocessor interface and documentation for endogenous_prior option

Closes #321
parent 030b7c96
......@@ -4406,6 +4406,10 @@ missing observations.
@item ar = @var{INTEGER}
@xref{ar}. Only useful in conjuction with option @code{moments_varendo}.
@item endogenous_prior
Use endogenous priors as in @cite{Christiano, Trabandt and Walentin
(2011)}.
@end table
@customhead{Note}
......@@ -7671,6 +7675,12 @@ Expansion Approach to Simulation of Stochastic Forward-Looking Models
with an Application to a Non-Linear Phillips Curve,'' @i{Computational
Economics}, 17, 125--139
@item
Christiano, Lawrence J., Mathias Trabandt and Karl Walentin (2011):
``Introducing financial frictions and unemployment into a small open
economy model,'' @i{Journal of Economic Dynamics and Control}, 35(12),
1999--2041
@item
Dennis, Richard (2007): ``Optimal Policy In Rational Expectations
Models: New Solution Algorithms,'' @i{Macroeconomic Dynamics}, 11(1),
......
......@@ -643,6 +643,9 @@ logMCMCposterior(VectorConstView &estParams, const MatrixConstView &data,
if (loglinear == 1)
throw LogMHMCMCposteriorMexErrMsgTxtException("Option loglinear is not supported");
if (*mxGetPr(mxGetField(options_, 0, "endogenous_prior")) == 1)
throw LogMHMCMCposteriorMexErrMsgTxtException("Option endogenous_prior is not supported");
double with_trend = *mxGetPr(mxGetField(bayestopt_, 0, "with_trend"));
if (with_trend == 1)
throw LogMHMCMCposteriorMexErrMsgTxtException("Observation trends are not supported");
......
......@@ -110,6 +110,9 @@ logposterior(VEC1 &estParams, const MatrixConstView &data,
if (loglinear == 1)
throw LogposteriorMexErrMsgTxtException("Option loglinear is not supported");
if (*mxGetPr(mxGetField(options_, 0, "endogenous_prior")) == 1)
throw LogposteriorMexErrMsgTxtException("Option endogenous_prior is not supported");
double with_trend = *mxGetPr(mxGetField(bayestopt_, 0, "with_trend"));
if (with_trend == 1)
throw LogposteriorMexErrMsgTxtException("Observation trends are not supported");
......
......@@ -97,7 +97,7 @@ class ParsingDriver;
%token BVAR_REPLIC BYTECODE ALL_VALUES_REQUIRED
%token CALIB_SMOOTHER CHANGE_TYPE CHECK CONDITIONAL_FORECAST CONDITIONAL_FORECAST_PATHS CONF_SIG CONSTANT CONTROLLED_VAREXO CORR COVAR CUTOFF CYCLE_REDUCTION LOGARITHMIC_REDUCTION
%token DATAFILE FILE DETERMINISTIC DOUBLING DR_CYCLE_REDUCTION_TOL DR_LOGARITHMIC_REDUCTION_TOL DR_LOGARITHMIC_REDUCTION_MAXITER DR_ALGO DROP DSAMPLE DYNASAVE DYNATYPE CALIBRATION
%token END ENDVAL EQUAL ESTIMATION ESTIMATED_PARAMS ESTIMATED_PARAMS_BOUNDS ESTIMATED_PARAMS_INIT EXTENDED_PATH
%token END ENDVAL EQUAL ESTIMATION ESTIMATED_PARAMS ESTIMATED_PARAMS_BOUNDS ESTIMATED_PARAMS_INIT EXTENDED_PATH ENDOGENOUS_PRIOR
%token FILENAME FILTER_STEP_AHEAD FILTERED_VARS FIRST_OBS LAST_OBS SET_TIME
%token <string_val> FLOAT_NUMBER
%token DEFAULT FIXED_POINT
......@@ -1536,6 +1536,7 @@ estimation_options : o_datafile
| o_dr_logarithmic_reduction_maxiter
| o_analytic_derivation
| o_ar
| o_endogenous_prior
;
list_optim_option : QUOTED_STRING COMMA QUOTED_STRING
......@@ -2626,6 +2627,7 @@ o_regime : REGIME EQUAL INT_NUMBER { driver.option_num("ms.regime",$3); };
o_data_obs_nbr : DATA_OBS_NBR EQUAL INT_NUMBER { driver.option_num("ms.forecast_data_obs",$3); };
o_discretionary_tol: DISCRETIONARY_TOL EQUAL non_negative_number { driver.option_num("discretionary_tol",$3); };
o_analytic_derivation : ANALYTIC_DERIVATION { driver.option_num("analytic_derivation", "1"); }
o_endogenous_prior : ENDOGENOUS_PRIOR { driver.option_num("endogenous_prior", "1"); }
range : symbol ':' symbol
{
......
......@@ -472,6 +472,7 @@ string eofbuff;
<DYNARE_STATEMENT>discretionary_tol {return token::DISCRETIONARY_TOL;}
<DYNARE_STATEMENT>analytic_derivation {return token::ANALYTIC_DERIVATION;}
<DYNARE_STATEMENT>solver_periods {return token::SOLVER_PERIODS;}
<DYNARE_STATEMENT>endogenous_prior {return token::ENDOGENOUS_PRIOR;}
<DYNARE_STATEMENT>[\$][^$]*[\$] {
strtok(yytext+1, "$");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment