I try to write a Dynare code for a simple two-sector model but always fails. Michel suggests me that the transition matrix is singular. This time, I think I made some correction such that the two sector model is essentially a one-sector model, since K1 and K2 are control variables instead of state variables. The true state in this model is the aggregate capital K.

I can get a nonsingular transition matrix based on my own calculation but Dynare still doesn’t work. I am really confused. Attached is my codes.

BCF.mod is the dynare version and tsjhrbc_driver is based on my written. The steadystate is calcuated by using broyden.m from Professor Miranda’s toolbox, which has a link here.

please notice that in this model, the dynamics are governed by two variables, ome1, the multiplier for capital accumulation and K, the aggregate capital. All the others should be auxillary variables or static variables.

ss_tsjhrbc.m (717 Bytes)

tsjhrbc_driver.m (1.87 KB)

BCF.mod (1.25 KB)