Commit 491e70ab authored by Houtan Bastani's avatar Houtan Bastani
Browse files

dmm/estimation: add dirichlet prior shape front end, #642

parent 66baffae
/*
* Copyright (C) 2007-2013 Dynare Team
* Copyright (C) 2007-2014 Dynare Team
*
* This file is part of Dynare.
*
......@@ -245,7 +245,8 @@ enum PriorDistributions
eInvGamma = 4,
eInvGamma1 = 4,
eUniform = 5,
eInvGamma2 = 6
eInvGamma2 = 6,
eDirichlet = 7
};
struct Block_contain_type
......
......@@ -2180,6 +2180,9 @@ BasicPriorStatement::writeCShape(ostream &output) const
case eInvGamma2:
output << "\"inv_gamma2\";" << endl;
break;
case eDirichlet:
output << "\"dirichlet\";" << endl;
break;
case eNoShape:
assert(prior_shape != eNoShape);
}
......
......@@ -144,7 +144,7 @@ class ParsingDriver;
%token VLISTLOG VLISTPER
%token RESTRICTION RESTRICTION_FNAME CROSS_RESTRICTIONS NLAGS CONTEMP_REDUCED_FORM REAL_PSEUDO_FORECAST
%token DUMMY_OBS NSTATES INDXSCALESSTATES NO_BAYESIAN_PRIOR SPECIFICATION SIMS_ZHA
%token <string_val> ALPHA BETA ABAND NINV CMS NCMS CNUM GAMMA INV_GAMMA INV_GAMMA1 INV_GAMMA2 NORMAL UNIFORM EPS PDF FIG DR NONE PRIOR PRIOR_VARIANCE HESSIAN IDENTITY_MATRIX
%token <string_val> ALPHA BETA ABAND NINV CMS NCMS CNUM GAMMA INV_GAMMA INV_GAMMA1 INV_GAMMA2 NORMAL UNIFORM EPS PDF FIG DR NONE PRIOR PRIOR_VARIANCE HESSIAN IDENTITY_MATRIX DIRICHLET
%token GSIG2_LMDM Q_DIAG FLAT_PRIOR NCSK NSTD
%token INDXPARR INDXOVR INDXAP APBAND INDXIMF IMFBAND INDXFORE FOREBAND INDXGFOREHAT INDXGIMFHAT
%token INDXESTIMA INDXGDLS EQ_MS FILTER_COVARIANCE FILTER_DECOMPOSITION
......@@ -1285,6 +1285,8 @@ prior_distribution : BETA
{ $$ = eUniform; }
| INV_GAMMA2
{ $$ = eInvGamma2; }
| DIRICHLET
{ $$ = eDirichlet; }
;
prior_pdf : BETA_PDF
......
......@@ -372,6 +372,10 @@ DATE -?[0-9]+([YyAa]|[Mm]([1-9]|1[0-2])|[Qq][1-4]|[Ww]([1-9]{1}|[1-4][0-9]|5[0-2
yylval->string_val = new string(yytext);
return token::INV_GAMMA2;
}
<DYNARE_STATEMENT>dirichlet {
yylval->string_val = new string(yytext);
return token::DIRICHLET;
}
<DYNARE_STATEMENT>normal {
yylval->string_val = new string(yytext);
return token::NORMAL;
......
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