I am trying to solve my first ratex model and make some impulse response functions using Dynare. I am following Leeper (1991). This is what I have done so far:
The utility function is $\log(c_{t})+\log(m_{t})$.
I obtain two first order conditions:
(1) $\frac{1}{R_{t}} = \beta E_{t}\frac{1}{\pi_{t+1}}$ and
(2) $m_{t} = c[\frac{R_{t}}{R_{t}-1}]$
Where $R_{t}$ is the gross nominal interest rate, $\pi_{t}$ is the gross inflation rate and $c$ the deterministic steady state value of consumption.
Suppose the monetary authority follows the following rule:
$R_{t} = \alpha_{0} + \alpha \pi_{t} + \theta_{t}$ where $\theta_{t} = \rho_{1} \theta_{t-1} + \epsilon_{1t}$, $|\rho_{1}|<1$
The fiscal authority follows:
$\tau_{t} = \gamma_{0} + \gamma b_{t-1} + \psi_{t}$ where $\psi_{t} = \rho_{2} \psi_{t-1} + \epsilon_{2t}$
I then substitute the monetary policy rule in to (1) and both policy rules in to the government's flow budget constraint and linearize around the steady state. I end up with the same results as Leeper:
(3) $E_{t}\widetilde{\pi_{t+1}} = \alpha \beta \widetilde{\pi_{t}} + \beta \theta_{t}$
(4) $\varphi_{1} \widetilde{\pi_{t}} + \widetilde{b_{t}} + \varphi_{2}\widetilde{\pi_{t-1}} - (\beta^{-1}- \gamma)\widetilde{b_{t-1}} + \varphi_{3} \theta_{t} \ +\psi_{t} + \varphi_{4} \theta_{t-1} = 0$
where the varphi's are steady state constants. So far I have just replicated what Leeper has done. Since I would like to make IRF's I believe I have to 'solve' the model. I haven't been taught this at university yet so all I know if from reading online lecture notes. I want to use Sims form, i.e
[![enter image description here][1]][1]
And this is the system I ended up with:
[![enter image description here][2]][2]
I forwarded (4) one period in order to obtain $b_{t+1}$ and just put everything in matrix form. $\eta$ is the forecasting error from (3).
I apologise for the matrix, I am not sure how to write matrices in TeX but hopefully you get the idea.
Now I want to stack the matrices as the following:
The capital gamma's and phi's are the coefficient matrices from above.
There should be a matrix for the forecasting errors but I am not completely sure how to obtain it. But that is a minor issue at this point. If I have understood correctly, I can solve this by inverting the block matrix and since it is diagonal, the inverse is simply the inverse of gamma and phi. However, since phi_0 is singular I cannot invert it. So I have two questions:
(1) How do I deal with singular matrices in this context? I have seen some papers by Chris Sims where he shows to how to deal with singular matrices but my knowledge of linear algebra is too basic to understand it.
(2) Once I manage to solve the model, can I use Dynare to make IRF's?