Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dynare
Commits
13fd7138
Commit
13fd7138
authored
11 years ago
by
Johannes Pfeifer
Committed by
Sébastien Villemot
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add description for conditional_forecasts
(cherry picked from commit
b9aa971d
)
parent
d0192ec9
Branches
Branches containing commit
Tags
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/mcforecast3.m
+33
-2
33 additions, 2 deletions
matlab/mcforecast3.m
with
33 additions
and
2 deletions
matlab/mcforecast3.m
+
33
−
2
View file @
13fd7138
function
forcs
=
mcforecast3
(
cL
,
H
,
mcValue
,
shocks
,
forcs
,
T
,
R
,
mv
,
mu
)
% Copyright (C) 2006-2008 Dynare Team
% forcs = mcforecast3(cL,H,mcValue,shocks,forcs,T,R,mv,mu)
% Computes the shock values for constrained forecasts necessary to keep
% endogenous variables at their constrained paths
%
% INPUTS
% o cL [scalar] number of controlled periods
% o H [scalar] number of forecast periods
% o mcValue [n_controlled_vars by cL double] paths for constrained variables
% o shocks [nexo by H double] shock values draws (with zeros for controlled_varexo)
% o forcs
% o T [n_endovars by n_endovars double] transition matrix of the state equation.
% o R [n_endovars by n_exo double] matrix relating the endogenous variables to the innovations in the state equation.
% o mv [n_controlled_exo by n_endovars boolean] indicator vector selecting constrained endogenous variables
% o mu [n_controlled_vars by nexo boolean] indicator vector
% selecting controlled exogenous variables
%
% Algorithm:
% Relies on state-space form:
% y_t=T*y_{t-1}+R*shocks(:,t)
% Shocks are split up into shocks_uncontrolled and shockscontrolled while
% the endogenous variables are also split up into controlled and
% uncontrolled ones to get:
% y_t(controlled_vars_index)=T*y_{t-1}(controlled_vars_index)+R(controlled_vars_index,uncontrolled_shocks_index)*shocks_uncontrolled_t
% + R(controlled_vars_index,controlled_shocks_index)*shocks_controlled_t
%
% This is then solved to get:
% shocks_controlled_t=(y_t(controlled_vars_index)-(T*y_{t-1}(controlled_vars_index)+R(controlled_vars_index,uncontrolled_shocks_index)*shocks_uncontrolled_t)/R(controlled_vars_index,controlled_shocks_index)
%
% After obtaining the shocks, and for uncontrolled periods, the state-space representation
% y_t=T*y_{t-1}+R*shocks(:,t)
% is used for forecasting
%
% Copyright (C) 2006-2013 Dynare Team
%
% This file is part of Dynare.
%
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment