From 89c332fdd6fc14e26d2ba9c943ea2b8ae63316f6 Mon Sep 17 00:00:00 2001 From: Michel Juillard <michel.juillard@ens.fr> Date: Tue, 18 Jan 2011 19:31:59 +0100 Subject: [PATCH] adding cova_compute option for estimation: when cova_compute=0, the covariance matrix of estimated parameters is not computed. --- doc/manual.xml | 4 ++++ preprocessor/DynareBison.yy | 6 +++++- preprocessor/DynareFlex.ll | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/manual.xml b/doc/manual.xml index cdeb69ee2f..6391e574c5 100644 --- a/doc/manual.xml +++ b/doc/manual.xml @@ -3361,6 +3361,10 @@ end; <term><option>selected_variables_only</option></term> <listitem><para>Only run the smoother on the variables listed just after the <command>estimation</command> command. Default: run the smoother on all the declared endogenous variables.</para></listitem> </varlistentry> + <varlistentry> + <term><option>cova_compute</option> = <replaceable>INTEGER</replaceable></term> + <listitem><para>When 0, the covariance matrix of estimated parameters is not computed after the computation of posterior mode (or maximum likelihood). This increases speed of computation in large models during development, when this information is not always necessary. Of course, it will break all successive computations that would require this covariance matrix. Default is 1.</para></listitem> + </varlistentry> <varlistentry> <term><option>solve_algo</option> = <replaceable>INTEGER</replaceable></term> <listitem><para>See <link linkend="solve_algo">there</link></para></listitem> diff --git a/preprocessor/DynareBison.yy b/preprocessor/DynareBison.yy index 58a489aad7..855020c113 100644 --- a/preprocessor/DynareBison.yy +++ b/preprocessor/DynareBison.yy @@ -159,7 +159,7 @@ class ParsingDriver; %token MARKOV_SWITCHING CHAIN STATE DURATION NUMBER_OF_STATES %token SVAR COEFFICIENTS VARIANCES CONSTANTS EQUATIONS %token EXTERNAL_FUNCTION EXT_FUNC_NAME EXT_FUNC_NARGS FIRST_DERIV_PROVIDED SECOND_DERIV_PROVIDED -%token SELECTED_VARIABLES_ONLY +%token SELECTED_VARIABLES_ONLY COVA_COMPUTE %type <node_val> expression expression_or_empty %type <node_val> equation hand_side @@ -1172,6 +1172,7 @@ estimation_options : o_datafile | o_filter_decomposition | o_selected_variables_only | o_conditional_variance_decomposition + | o_cova_compute ; list_optim_option : QUOTED_STRING COMMA QUOTED_STRING @@ -1930,6 +1931,9 @@ o_filter_decomposition : FILTER_DECOMPOSITION o_selected_variables_only : SELECTED_VARIABLES_ONLY { driver.option_num("selected_variables_only","1");} ; +o_cova_compute : COVA_COMPUTE EQUAL INT_NUMBER + { driver.option_num("cova_compute",$3);} + ; range : symbol ':' symbol { diff --git a/preprocessor/DynareFlex.ll b/preprocessor/DynareFlex.ll index 84089100d9..9915b5ce55 100644 --- a/preprocessor/DynareFlex.ll +++ b/preprocessor/DynareFlex.ll @@ -362,6 +362,7 @@ string eofbuff; <DYNARE_STATEMENT>pruning {return token::PRUNING; } <DYNARE_STATEMENT>deflator {return token::DEFLATOR;} <DYNARE_STATEMENT>growth_factor {return token::GROWTH_FACTOR;} +<DYNARE_STATEMENT>cova_compute {return token::COVA_COMPUTE;} <DYNARE_STATEMENT>[\$][^$]*[\$] { strtok(yytext+1, "$"); -- GitLab