Commit 40cc1138 authored by MichelJuillard's avatar MichelJuillard

added an error if periods in conditional_variance_decomposition option

are not strictly positive.
parent 7840dbbb
......@@ -3027,16 +3027,16 @@ See below.
@item conditional_variance_decomposition = [@var{INTEGER1} @var{INTEGER2} @dots{}]
Computes a conditional variance decomposition for the specified
period(s). Conditional variances are given by
period(s). The periods must be strictly positive. Conditional variances are given by
@math{var(y_{t+k}|t)}. For period 1, the conditional variance
decomposition provides the decomposition of the effects of shocks upon
impact. The results are stored in
@var{oo_.conditional_variance_decomposition}
@code{oo_.conditional_variance_decomposition}
(@pxref{oo_.conditional_variance_decomposition}).
@item pruning
Discard higher order terms when iteratively computing simulations of
the solution, as in @cite{Schaumburg and Sims (2008)}.
the solution, as in @cite{Kim, Kim, Schaumburg and Sims (2008)}.
@item partial_information
@anchor{partial_information}
......
......@@ -33,6 +33,11 @@ function ConditionalVarianceDecomposition = conditional_variance_decomposition(S
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if any(Steps <= 0)
error(['Conditional variance decomposition: All periods must be strictly ' ...
'positive'])
end
number_of_state_innovations = ...
StateSpaceModel.number_of_state_innovations;
transition_matrix = StateSpaceModel.transition_matrix;
......
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