Error: DsgeSmoother - Switching to univariate filter. This may be a sign of stochastic singularity

I have developed a DSGE model consisting of six main files. Before running the simulations, the Blanchard-Kahn conditions were satisfied, and no issues were identified with the model. However, after initiating the simulation, Dynare prompted the following message:

DsgeSmoother: Switching to univariate filter. This may be a sign of stochastic singularity.

I am uncertain about the exact cause of this problem. At this stage, it seems impractical to retrospectively examine each equation one by one to identify the issue. Therefore, I would greatly appreciate any assistance, guidance, or help in diagnosing the problem from the experts.

Thank you very much to all the professors and the Dynare community for your continuous guidance and support.

It turns out that in your model the observables are not affected by the shocks at all. If you put

stoch_simul(order=1, irf=20) CapYG CapF;
varobs CapYG   CapF ; 

you will get

All endogenous are constant or non stationary, not displaying correlations and auto-correlations

If the shocks cannot explain the data, you cannot use the data to estimate the model.

Dear Professor Pfeifer,

First of all, thank you for your continuous guidance, which has been invaluable as I work with Dynare on DSGE modeling, allowing me to constantly improve with the guidance of an expert.

Based on the issues you pointed out last time, I prepared the data and attempted to run the model again, but Dynare indicated that there are collinearity problems in the model. I now have to simplify the model to identify the root cause. Currently, I’ve mainly included some price variables, and after running, the system shows:

I tried to identify the problem myself, but it seems that there are no redundant equations. I would appreciate it if you could take a look and advise me on where the issue lies and guide me in resolving it. The code has been sent to you.

Thinks in advance!

MODEL_DIAGNOSTICS: The Jacobian of the static model is singular
MODEL_DIAGNOSTICS: there is 1 colinear relationships between the variables and the equations
Colinear variables:
CapPY
CapPI
Colinear equations
1 2
MODEL_DIAGNOSTICS: The singularity seems to be (partly) caused by the presence of a unit root
MODEL_DIAGNOSTICS: as the absolute value of one eigenvalue is in the range of ±1e-6 to 1.
MODEL_DIAGNOSTICS: If the model is actually supposed to feature unit root behavior, such a warning is expected,
MODEL_DIAGNOSTICS: but you should nevertheless check whether there is an additional singularity problem.
MODEL_DIAGNOSTICS: The presence of a singularity problem typically indicates that there is one
MODEL_DIAGNOSTICS: redundant equation entered in the model block, while another non-redundant equation
MODEL_DIAGNOSTICS: is missing. The problem often derives from Walras Law.

Residuals of the static equations:

Equation number 1 : 0 : Equation CappiY
Equation number 2 : 0 : Equation CapPY

This warning is expected due to a unit root. See

If it only affects price levels, you can safely ignore it.

Thanks a lot, professor

Dear Professor Jpfeifer,

First of all, thank you for your help.
I have encountered a new issue while running the model. Although I understand the error message, I have tried multiple approaches I could think of to resolve it, but I still haven’t succeeded. I would greatly appreciate your guidance or suggestions. Thank you in advance!

You did not declare endogenous variables after the estimation/calib_smoother command.
Estimation using a non linear filter!

ESTIMATION_CHECKS: There was an error in computing the likelihood for initial parameter values.
ESTIMATION_CHECKS: If this is not a problem with the setting of options (check the error message below),
ESTIMATION_CHECKS: you should try using the calibrated version of the model as starting values. To do
ESTIMATION_CHECKS: this, add an empty estimated_params_init-block with use_calibration option immediately before the estimation
ESTIMATION_CHECKS: command (and after the estimated_params-block so that it does not get overwritten):


错误使用 initial_estimation_checks (line 111)
initial_estimation_checks:: particle filtering requires measurement error on the observables
出错 initial_estimation_checks (line 111)
        error('initial_estimation_checks:: %s requires measurement error on the observables',disp_string)
出错 dynare_estimation_1 (line 159)
    oo_ = initial_estimation_checks(objective_function,xparam1,dataset_,dataset_info,M_,estim_params_,options_,bayestopt_,bounds,oo_);
出错 dynare_estimation (line 118)
    dynare_estimation_1(var_list,dname);
出错 msDSGEPF.driver (line 1022)
oo_recursive_=dynare_estimation(var_list_);
出错 dynare (line 278)
    evalin('base',[fname '.driver']); 

Additionally, I try to identify the cause of the problem by studying the examples in “jpfeifer\dynare-master\dynare-master”. However, when running examples like “dummy_model.mod” and two others, I received the same error message:

       You did not declare endogenous variables after the estimation/calib_smoother command.

Estimation using a non linear filter!

ESTIMATION_CHECKS: There was an error in computing the likelihood for initial parameter values.
ESTIMATION_CHECKS: If this is not a problem with the setting of options (check the error message below),
ESTIMATION_CHECKS: you should try using the calibrated version of the model as starting values. To do
ESTIMATION_CHECKS: this, add an empty estimated_params_init-block with use_calibration option immediately before the estimation
ESTIMATION_CHECKS: command (and after the estimated_params-block so that it does not get overwritten):

错误使用 initial_estimation_checks (line 111)
initial_estimation_checks:: particle filtering requires measurement error on the observables

dummy_model.mod (916 Bytes)

You are not using the correct syntax for the measurement error. An example would be

estimated_params;
    ... 
    stderr y, uniform_pdf,,, 0.00001, 0.1;
    stderr l, uniform_pdf,,, 0.00001, 0.1;
    stderr i, uniform_pdf,,, 0.00001, 0.1;
end;

varobs y l i ;

See tests/particle/dsge_base2.mod · master · Dynare / dynare · GitLab

The forecast error variance in the multivariate Kalman filter became singular

Dear Professor jpfeifer,

First of all, I would like to express my sincere gratitude for your assistance. After studying the Example and dsge_base2.mod file you shared, I have gained a deeper understanding of the relevant knowledge.

Now, I have made adjustments to the code but encountered some new issues, as described below:

  1. When I run the shock_decomposition command, it displays the shock decomposition results, the system prompts:
    “DsgeSmoother: Switching to univariate filter. This is usually due to co-integration in diffuse filter, otherwise it may be a sign of stochastic singularity.”

  2. However, when running the estimation command, the system displays:
    initial_estimation_checks:: The forecast error variance in the multivariate Kalman filter became singular.
    initial_estimation_checks:: This is often a sign of stochastic singularity, but can also sometimes happen by chance
    initial_estimation_checks:: for a particular combination of parameters and data realizations.
    initial_estimation_checks:: If you think the latter is the case, you should try with different initial values for the estimated parameters.

    ESTIMATION_CHECKS: There was an error in computing the likelihood for initial parameter values.
    ESTIMATION_CHECKS: If this is not a problem with the setting of options (check the error message below),
    ESTIMATION_CHECKS: you should try using the calibrated version of the model as starting values. To do
    ESTIMATION_CHECKS: this, add an empty estimated_params_init-block with use_calibration option immediately before the estimation
    ESTIMATION_CHECKS: command (and after the estimated_params-block so that it does not get overwritten):

    Error in initial_estimation_checks (line 264)
    initial_estimation_checks:: The forecast error variance in the multivariate Kalman filter became singular.
    … (followed by a series of error tracebacks)

I have three additional questions to consult you on:

  1. Since the shock_decomposition command can display results, does this indicate that the model’s dynamic equations have been solved?

  2. The system suggests that there is an overall co-integration relationship among variables (i.e., a common unit root). Does this mean that as long as the co-integration relationship persists, I can continue adding variables and equations?

  3. The estimation command reports a stochastic singularity error. I’m not sure where the problem lies and would appreciate your guidance.

    The code has been sent to you, and I would appreciate it if you could take a look at it for me

    Once again, I extend my deepest respect and heartfelt thanks to you.

I am getting that one the observables PY does not move at all. That may explain the message.