# Problem with multisector NK model

**URL:** <https://forum.dynare.org/t/problem-with-multisector-nk-model/22165>\
**Category:** Stochastic simulations\
**Created:** [27 March 2023 14:07 UTC](https://forum.dynare.org/t/problem-with-multisector-nk-model/22165 "2023-03-27T14:07:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![viniciusdms](https://forum.dynare.org/letter_avatar_proxy/v4/letter/v/c57346/32.png) [@viniciusdms](https://forum.dynare.org/u/viniciusdms)\
**Post date:** [27 March 2023 14:07 UTC](https://forum.dynare.org/t/problem-with-multisector-nk-model/22165/1 "2023-03-27T14:07:44Z")

</div>

Dear all,

I’m currently running a multisector NK model with Calvo pricing and two processing stages (intermediate input firms and final goods firms).

I’m encountering two problems:

1. If I use the input-output matrix that I estimated (no final goods are used as intermediate inputs, therefore several rows are = 0 in the matrix) I get indeterminacy of Blanchard & Khan conditions. Am I missing something in the conditions of calibration?

2. Once I replace the 0 entries with an arbitrarily small number to proceed with estimation, I’m getting the following error:

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 using initial\_estimation\_checks (line 159)  
Error using initial\_estimation\_checks (line 159)  
initial\_estimation\_checks:: The forecast error variance in the multivariate Kalman filter became  
singular.  
Error in dynare\_estimation\_1 (line 164)  
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 dy\_code.driver (line 36581)  
oo\_recursive\_=dynare\_estimation(var\_list\_);  
Error in dynare (line 293)  
evalin(‘base’,[fname ‘.driver’]) ;

I tried removing some varobs to avoid linear relationship between the observables but also did not work.

I wonder if anyone has encountered this problem before and could pls help.

Best regards,  
Vinicius

[dy\_code.mod](https://forum.dynare.org/uploads/short-url/77SzDKuj8FL4R625lCNWtMAbNJv.mod) (13.8 KB)
