diff --git a/matlab/+var_expectation/+update/parameters.m b/matlab/+var_expectation/+update/parameters.m index cf104d922..e3dae46e3 100644 --- a/matlab/+var_expectation/+update/parameters.m +++ b/matlab/+var_expectation/+update/parameters.m @@ -44,21 +44,21 @@ end varexpectationmodel = DynareModel.var_expectation.(varexpectationmodelname); % Get the name of the associated VAR model and test its existence. -if ~isfield(DynareModel.var, varexpectationmodel.var_model_name) - error('Unknown VAR (%s) in VAR_EXPECTATION_MODEL (%s)!', varexpectationmodel.var_model_name, varexpectationmodelname) +if ~isfield(DynareModel.var, varexpectationmodel.auxiliary_model_name) + error('Unknown VAR (%s) in VAR_EXPECTATION_MODEL (%s)!', varexpectationmodel.auxiliary_model_name, varexpectationmodelname) end -varmodel = DynareModel.var.(varexpectationmodel.var_model_name); +varmodel = DynareModel.var.(varexpectationmodel.auxiliary_model_name); % Check that we have the values of the VAR matrices. -if ~isfield(DynareOutput.var, varexpectationmodel.var_model_name) - error('VAR model %s has to be estimated or calibrated first!', varexpectationmodel.var_model_name) +if ~isfield(DynareOutput.var, varexpectationmodel.auxiliary_model_name) + error('VAR model %s has to be estimated or calibrated first!', varexpectationmodel.auxiliary_model_name) end -varcalib = DynareOutput.var.(varexpectationmodel.var_model_name); +varcalib = DynareOutput.var.(varexpectationmodel.auxiliary_model_name); if ~isfield(varcalib, 'CompanionMatrix') || any(isnan(varcalib.CompanionMatrix(:))) - message = sprintf('VAR model %s has to be estimated first.', varexpectationmodel.var_model_name); + message = sprintf('VAR model %s has to be estimated first.', varexpectationmodel.auxiliary_model_name); message = sprintf('s\nPlease use get_companion_matrix command first.', message); error(message) end diff --git a/tests/var-expectations/1/example.mod b/tests/var-expectations/1/example.mod index bc3e84a92..b534c4265 100644 --- a/tests/var-expectations/1/example.mod +++ b/tests/var-expectations/1/example.mod @@ -36,7 +36,7 @@ var_model(model_name = toto, eqtags = [ 'X' 'Y' 'Z' ]); ** where the sum is over h=0,…,∞ and the conditional expectations are computed with VAR model `var_model_name`. */ -var_expectation_model(model_name = varexp, variable = x, var_model_name = toto, horizon = 1, discount = beta) ; +var_expectation_model(model_name = varexp, variable = x, auxiliary_model_name = toto, horizon = 1, discount = beta) ; model; diff --git a/tests/var-expectations/2/example.mod b/tests/var-expectations/2/example.mod index 34bbd3269..8b75989b1 100644 --- a/tests/var-expectations/2/example.mod +++ b/tests/var-expectations/2/example.mod @@ -36,7 +36,7 @@ var_model(model_name = toto, eqtags = [ 'X' 'Y' 'Z' ]); ** where the sum is over h=0,…,∞ and the conditional expectations are computed with VAR model `var_model_name`. */ -var_expectation_model(model_name = varexp, variable = x, var_model_name = toto, horizon = 2, discount = beta) ; +var_expectation_model(model_name = varexp, variable = x, auxiliary_model_name = toto, horizon = 2, discount = beta) ; model; diff --git a/tests/var-expectations/3/example.mod b/tests/var-expectations/3/example.mod index 0bc3bfd2a..ffe8a3d42 100644 --- a/tests/var-expectations/3/example.mod +++ b/tests/var-expectations/3/example.mod @@ -36,7 +36,7 @@ var_model(model_name = toto, eqtags = [ 'X' 'Y' 'Z' ]); ** where the sum is over h=0,…,∞ and the conditional expectations are computed with VAR model `var_model_name`. */ -var_expectation_model(model_name = varexp, variable = x, var_model_name = toto, horizon = 0:Inf, discount = beta) ; +var_expectation_model(model_name = varexp, variable = x, auxiliary_model_name = toto, horizon = 0:Inf, discount = beta) ; model; diff --git a/tests/var-expectations/4/example.mod b/tests/var-expectations/4/example.mod index 415197aab..f356696ad 100644 --- a/tests/var-expectations/4/example.mod +++ b/tests/var-expectations/4/example.mod @@ -36,7 +36,7 @@ var_model(model_name = toto, eqtags = [ 'X' 'Y' 'Z' ]); ** where the sum is over h=0,…,∞ and the conditional expectations are computed with VAR model `var_model_name`. */ -var_expectation_model(model_name = varexp, variable = x, var_model_name = toto, horizon = 0:500, discount = beta) ; +var_expectation_model(model_name = varexp, variable = x, auxiliary_model_name = toto, horizon = 0:500, discount = beta) ; model; diff --git a/tests/var-expectations/5/example.mod b/tests/var-expectations/5/example.mod index 3e4f620c6..1a5a4e515 100644 --- a/tests/var-expectations/5/example.mod +++ b/tests/var-expectations/5/example.mod @@ -36,7 +36,7 @@ var_model(model_name = toto, eqtags = [ 'X' 'Y' 'Z' ]); ** where the sum is over h=0,…,∞ and the conditional expectations are computed with VAR model `var_model_name`. */ -var_expectation_model(model_name = varexp, variable = x, var_model_name = toto, horizon = 15:50, discount = beta) ; +var_expectation_model(model_name = varexp, variable = x, auxiliary_model_name = toto, horizon = 15:50, discount = beta) ; model;