I have a problem with my code
If I do not use the forecast command in the estimation command, then Dynare works well
But then I use the command forecast = 4 as following

, then Dynare report the following error
"Matrix dimensions must agree.
Error in prior_posterior_statistics_core (line 206)
yf = yf+repmat(SteadyState’,horizon+maxlag,1);
Error in prior_posterior_statistics (line 222)
[fout] = prior_posterior_statistics_core(localVars,1,B,0);
Error in dynare_estimation_1 (line 821)
prior_posterior_statistics(‘posterior’,dataset_);
Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);
Error in ALEstim_pet_modi (line 1010)
dynare_estimation(var_list_);
Error in dynare (line 180)
evalin(‘base’,fname) ;
Error in Main (line 3)
dynare ALEstim_pet_modi "
without forecast=4 inside estimation( ); it works well
Can anyone help me to detect this problem
With best wishes

"Error using initial_estimation_checks (line 143)
initial_estimation_checks:: The forecast error variance in the multivariate Kalman filter became singular.
Error in initial_estimation_checks (line 143)
error(‘initial_estimation_checks:: The forecast error variance in the multivariate Kalman filter became singular.’)
Error in dynare_estimation_1 (line 165)
oo_ = initial_estimation_checks(objective_function,xparam1,dataset_,dataset_info,M_,estim_params_,options_,bayestopt_,bounds,oo_);
Error in dynare_estimation (line 105)
dynare_estimation_1(var_list,dname);
Error in ALEstim_pet_modi (line 1017)
oo_recursive_=dynare_estimation(var_list_);
Error in dynare (line 223)
evalin(‘base’,fname) ;
Error in Main (line 3)
dynare ALEstim_pet_modi nostrict ‘’

I can not upload my file in here since it has more than 12 MB

No, estimation does not work properly as the error indicates. You just did not see the problem in older versions of Dynare.
See e.g. Performing an estimation of parameters using real data for a discussion of the problem.

stochastically singular means that in my model, number of obs.variable is greater than number of shock. My understanding is correct? if not, please correct me

In my model, there is 7 shocks and 6 obs. variables
Seven shocks are
1.eps_epshat
2.eps_lambdafhat
3.eps_upsilonhat
4.eps_zetachat
5.eps_zetahhat
6. eps_epsRhat
7. eps_piThat

Six obs. variables are
1.data_pid
2.data_c
3.data_i
4.data_R
5.E_t
6.data_y

I running dynare 4.5.0 (not 4.5.1), then it reports following error:

"Error using reshape
To RESHAPE the number of elements must not change.
Error in McMCDiagnostics (line 93)
Draws = reshape(Draws,[NumberOfDraws nblck]);
Error in dynare_estimation_1 (line 464)
oo_= McMCDiagnostics(options_, estim_params_, M_,oo_);
Error in dynare_estimation (line 105)
dynare_estimation_1(var_list,dname);
Error in ALEstim_pet_modi (line 1001)
oo_recursive_=dynare_estimation(var_list_);
Error in dynare (line 223)
evalin(‘base’,fname) ;
Error in Main (line 4)
dynare ALEstim_pet_modi nostrict "

I do not know what is this
my file is here q8.zip (28.3 KB)

Do you think, this problem is caused by the steady state file?

I am not sure what you are doing, but you cannot use the load_mh_file-option if you are changing your model features like the observables. You need to start from scratch in this case (except for the mode-file)