MS-SBVAR: add specification option

time-shift
Houtan Bastani 2011-09-15 17:03:53 -04:00
parent b62c50bc0f
commit ee8da2b1c9
4 changed files with 16 additions and 2 deletions

View File

@ -60,6 +60,7 @@ options_.ms.bayesian_prior = 1;
options_.ms.alpha = 1;
options_.ms.beta = 1;
options_.ms.gsig2_lmdm = 50^2;
options_.ms.specification = 2;
if isfield(options_.ms,'initial_year')
options_.ms = rmfield(options_.ms,'initial_year');
end

View File

@ -358,6 +358,10 @@ nrows = 1;
ncols = nvar;
fn_fprintmatrix(fidForC, xM', nrows, ncols, indxFloat)
%=== Specification
fprintf(fidForC,'\n%s','//== Specification (0=default 1=Sims-Zha 2=Random Walk) ==//');
fprintf(fidForC,'\n%d\n\n',options_.ms.specification);
%=== Uiconst: nvar-by-1 cell. In each cell, nvar-by-qi orthonormal basis for the null of the ith
% equation contemporaneous restriction matrix where qi is the number of free parameters.
% With this transformation, we have ai = Ui*bi or Ui'*ai = bi where ai is a vector

View File

@ -144,8 +144,8 @@ class ParsingDriver;
/* end of GSA analysis*/
%token FREQ INITIAL_YEAR INITIAL_SUBPERIOD FINAL_YEAR FINAL_SUBPERIOD DATA VLIST LOG_VAR PERCENT_VAR
%token VLISTLOG VLISTPER
%token RESTRICTIONS RESTRICTION_FNAME CROSS_RESTRICTIONS NLAGS CONTEMP_REDUCED_FORM REAL_PSEUDO_FORECAST
%token DUMMY_OBS NSTATES INDXSCALESSTATES NO_BAYESIAN_PRIOR
%token RESTRICTIONS RESTRICTION_FNAME CROSS_RESTRICTIONS NLAGS CONTEMP_REDUCED_FORM REAL_PSEUDO_FORECAST NONE
%token DUMMY_OBS NSTATES INDXSCALESSTATES NO_BAYESIAN_PRIOR SPECIFICATION SIMS_ZHA
%token <string_val> ALPHA BETA ABAND NINV CMS NCMS CNUM
%token GSIG2_LMDM Q_DIAG FLAT_PRIOR NCSK NSTD
%token INDXPARR INDXOVR INDXAP APBAND INDXIMF IMFBAND INDXFORE FOREBAND INDXGFOREHAT INDXGIMFHAT
@ -1630,6 +1630,7 @@ ms_estimation_option : o_coefficients_prior_hyperparameters
| o_alpha
| o_beta
| o_gsig2_lmdm
| o_specification
| o_output_file_tag
| o_file_tag
| o_no_create_init
@ -2025,6 +2026,11 @@ o_indxscalesstates : INDXSCALESSTATES EQUAL INT_NUMBER {driver.option_num("ms.in
o_alpha : ALPHA EQUAL non_negative_number {driver.option_num("ms.alpha",$3); };
o_beta : BETA EQUAL non_negative_number {driver.option_num("ms.beta",$3); };
o_gsig2_lmdm : GSIG2_LMDM EQUAL INT_NUMBER {driver.option_num("ms.gsig2_lmdm",$3); };
o_specification : SPECIFICATION EQUAL SIMS_ZHA
{driver.option_num("ms.specification","1"); }
| SPECIFICATION EQUAL NONE
{driver.option_num("ms.specification","0"); }
;
o_q_diag : Q_DIAG EQUAL non_negative_number {driver.option_num("ms.q_diag",$3); };
o_flat_prior : FLAT_PRIOR EQUAL INT_NUMBER {driver.option_num("ms.flat_prior",$3); };
o_ncsk : NCSK EQUAL INT_NUMBER {driver.option_num("ms.ncsk",$3); };

View File

@ -277,6 +277,9 @@ string eofbuff;
return token::BETA;
}
<DYNARE_STATEMENT>gsig2_lmdm {return token::GSIG2_LMDM;}
<DYNARE_STATEMENT>specification {return token::SPECIFICATION;}
<DYNARE_STATEMENT>sims_zha {return token::SIMS_ZHA;}
<DYNARE_STATEMENT>none {return token::NONE;}
<DYNARE_STATEMENT>q_diag {return token::Q_DIAG;}
<DYNARE_STATEMENT>flat_prior {return token::FLAT_PRIOR;}
<DYNARE_STATEMENT>ncsk {return token::NCSK;}