Merge pull request #527 from JohannesPfeifer/bugfix_corr
Bugfixes for set_param_values and for purely static modelstime-shift
commit
40fc867e28
|
@ -4172,7 +4172,7 @@ end;
|
|||
@deffnx Block estimated_params_init (@var{OPTIONS}@dots{});
|
||||
|
||||
This block declares numerical initial values for the optimizer when
|
||||
these ones are different from the prior mean.
|
||||
these ones are different from the prior mean. It should be specified after the @code{estimated_params}-block as otherwise the specified starting values are overwritten by the latter.
|
||||
|
||||
Each line has the following syntax:
|
||||
|
||||
|
@ -4186,7 +4186,7 @@ stderr VARIABLE_NAME | corr VARIABLE_NAME_1, VARIABLE_NAME_2 | PARAMETER_NAME
|
|||
@table @code
|
||||
|
||||
@item use_calibration
|
||||
Use the parameters from calibration as starting values for estimation.
|
||||
For not specifically intialized parameters, use the deep parameters and the elements of the covariance matrix specified in the @code{shocks}-block from calibration as starting values for estimation. For components of the @code{shocks}-block that were not explicitly specified during calibration or which violate the prior, the prior mean is used.
|
||||
@end table
|
||||
|
||||
@xref{estimated_params}, for the meaning and syntax of the various components.
|
||||
|
|
|
@ -67,8 +67,8 @@ end
|
|||
%build covariance matrix from correlation matrix and variances already on
|
||||
%diagonal
|
||||
Sigma_e = diag(sqrt(diag(Sigma_e)))*Correlation_matrix*diag(sqrt(diag(Sigma_e)));
|
||||
if isfield(estim_params,'calibrated_covariances')
|
||||
Sigma_e(estim_params.calibrated_covariances.position)=estim_params.calibrated_covariances.cov_value;
|
||||
if isfield(estim_params_,'calibrated_covariances')
|
||||
Sigma_e(estim_params_.calibrated_covariances.position)=estim_params_.calibrated_covariances.cov_value;
|
||||
end
|
||||
|
||||
% and update offset
|
||||
|
|
|
@ -34,7 +34,7 @@ function dr=set_state_space(dr,DynareModel,DynareOptions)
|
|||
%! @end deftypefn
|
||||
%@eod:
|
||||
|
||||
% Copyright (C) 1996-2012 Dynare Team
|
||||
% Copyright (C) 1996-2013 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -84,6 +84,9 @@ if max_lag > 0
|
|||
end
|
||||
kmask = [kmask; lead_lag_incidence(1,order_var)] ;
|
||||
else
|
||||
if max_lead==0 %%in this case lead_lag_incidence has no entry max_lag+2
|
||||
error('Dynare currently does not allow to solve purely static models in a stochastic context.')
|
||||
end
|
||||
kmask = lead_lag_incidence(max_lag+2,order_var) ;
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue