Merge branch 'johannes-documentation'

time-shift
Stéphane Adjemian (Scylla) 2014-01-30 15:33:28 +01:00
commit 8829baa3aa
2 changed files with 21 additions and 21 deletions

View File

@ -4436,7 +4436,7 @@ The number of the first observation to be used. Default: @code{1}
@item prefilter = @var{INTEGER}
@anchor{prefilter}
A value of @code{1} means that the estimation procedure will demean
the data. Default: @code{0}, @i{i.e.} no prefiltering
each data series by its empirical mean. Default: @code{0}, @i{i.e.} no prefiltering
@item presample = @var{INTEGER}
@anchor{presample}
@ -4446,8 +4446,8 @@ likelihood. These first observations are used as a training sample. Default: @co
@item loglinear
@anchor{loglinear}
Computes a log-linear approximation of the model instead of a linear
approximation. The data must correspond to the definition of the
variables used in the model. Default: computes a linear approximation
approximation. As always in the context of estimation, the data must correspond to the definition of the
variables used in the model (see \cite{Pfeifer 2013} for more details on how to correctly specify observation equations linking model variables and the data). If you specify the loglinear option, Dynare will take the logarithm of both your model variables and of your data as it assumes the data to correspond to the original non-logged model variables. The displayed posterior results like impulse responses, smoothed variables, and moments will be for the logged variables, not the original un-logged ones. Default: computes a linear approximation
@item plot_priors = @var{INTEGER}
Control the plotting of priors:
@ -4939,7 +4939,7 @@ Use the Univariate Diffuse Kalman Filter
@end table
@noindent
Default value is @code{0}.
Default value is @code{0}. In case of missing observations of single or all series, Dynare treats those missing values as unobserved states and uses the Kalman filter to infer their value (see e.g. @cite{Durbin and Koopman (2012), Ch. 4.10})
@item kalman_tol = @var{DOUBLE}
@ -4965,15 +4965,9 @@ Triggers the computation k-step ahead filtered values. Stores results in
@anchor{filter_decomposition} Triggers the computation of the shock
decomposition of the above k-step ahead filtered values.
@item constant
@dots{}
@item noconstant
@dots{}
@item diffuse_filter
Uses the diffuse Kalman filter (as described in
@cite{Durbin and Koopman (2001)} and @cite{Koopman and Durbin
@cite{Durbin and Koopman (2012)} and @cite{Koopman and Durbin
(2003)}) to estimate models with non-stationary observed variables.
When @code{diffuse_filter} is used the @code{lik_init} option of
@ -11152,8 +11146,8 @@ Models: New Solution Algorithms,'' @i{Macroeconomic Dynamics}, 11(1),
31--55
@item
Durbin, J. and S. J. Koopman (2001), @i{Time Series Analysis by State
Space Methods}, Oxford University Press
Durbin, J. and S. J. Koopman (2012), @i{Time Series Analysis by State
Space Methods}, Second Revised Edition, Oxford University Press
@item
Fair, Ray and John Taylor (1983): ``Solution and Maximum Likelihood
@ -11233,6 +11227,9 @@ Pearlman, Joseph, David Currie, and Paul Levine (1986): ``Rational
expectations models with partial information,'' @i{Economic
Modelling}, 3(2), 90--105
@item
Pfeifer, Johannes (2013): ``A Guide to Specifying Observation Equations for the Estimation of DSGE Models''
@item
Rabanal, Pau and Juan Rubio-Ramirez (2003): ``Comparing New Keynesian
Models of the Business Cycle: A Bayesian Approach,'' Federal Reserve

View File

@ -93,12 +93,6 @@ elseif isempty(options_.qz_criterium)
options_.qz_criterium = 1+1e-6;
end
% If the data are prefiltered then there must not be constants in the
% measurement equation of the DSGE model or in the DSGE-VAR model.
if options_.prefilter == 1
options_.noconstant = 1;
end
% Set options related to filtered variables.
if ~isequal(options_.filtered_vars,0) && isempty(options_.filter_step_ahead)
options_.filter_step_ahead = 1;
@ -478,7 +472,7 @@ dataset_ = initialize_dataset(options_.datafile,options_.varobs,options_.first_o
options_.nobs = dataset_.info.ntobs;
% setting noconstant option
% setting steadystate_check_flag option
if options_.diffuse_filter
steadystate_check_flag = 0;
else
@ -498,4 +492,13 @@ if all(abs(oo_.steady_state(bayestopt_.mfys))<1e-9)
options_.noconstant = 1;
else
options_.noconstant = 0;
end
% If the data are prefiltered then there must not be constants in the
% measurement equation of the DSGE model or in the DSGE-VAR model.
if options_.prefilter == 1
fprintf('\nestimation_init: You have specified the option "prefilter" to demean your data,\n')
fprintf('estimation_init: but your observation equations are not mean zero. Either change your observation\n')
fprintf('estimation_init: equation or drop the prefiltering.\n')
error('The option "prefilter" is inconsistent with the non-zero mean measurement equations in the model.')
end
end