Good evening here is the code of Gali et monacelli 2005 , I added the equation 6,7,8
/6 the domestic inflation based taylor rule
//7 The CPI inflation-based Taylor rule (CITR, for short)
//8 the exchange rate peg (PEG, for short)
I obtain this message
Starting Dynare (version 4.3.2).
Starting preprocessing of the model file …
Substitution of endo leads >= 2: added 6 auxiliary variables and equations.
Substitution of endo lags >= 2: added 11 auxiliary variables and equations.
ERROR: There are 39 equations but 36 endogenous variables!
??? Error using ==> dynare at 114
DYNARE: preprocessing failed
I see from another message that you still have problems with this model.
If you write it as below, for example as the PEG version, it works:
x = x(+1) - sigma^(-1)( r - pih(+1) - rnat) ; //1 New IS Curve of SOE, equ. (37) in the paper
rnat = -sigmatau*(1-rhoa)a + alphasigma*(theta+xi)(rhoy-1)ystar; //2 def. of nature rate of interest rate of SOE,
pih = beta * pih(+1)+ kappax; //3 Philips Curve of the SOE, equ. (36) in the paper
ynat = taua + alphaxiystar; //4 def. of nature level of output of SOE, equ. (35) in the paper
x = y - ynat; //5 def. of outout gap of SOE
//r = rho + phipipih; //6 the domestic inflation based taylor rule
//r = rho + phipipi; //7 The CPI inflation-based Taylor rule (CITR, for short)
e = 0; //8 the exchange rate peg (PEG, for short)
y = ystar + sigma^(-1)s; //9 wedge between domestic and world output, equ (29)
pi = pih + alpha(s-s(-1)); //10 wedge (gap) between domestic and CPI inflation, equ (14)
pi = p - p(-1); //11 def. of CPI inflation
pih = ph - ph(-1); //12 def. of domestic inflation (PPI)
s = s(-1) + e - e(-1) + pistar - pih; //13 from def. of TOT, first difference of equ (15), pi_star=0
//r = e(+1) - e; //14 not include here, Uncovered Interest rate Parity, set world interest rate to zero(see p724), equ (19)
pistar = 0; //15 foreign inflation is set to be zero
a = rhoaa(-1) + a_; //17 exogenous process of productivity in SOE,
ystar= rhoyystar(-1) + ystar_; //18 exogenous process of world output,
A replication file for the Gali/Monacelli (2005): Monetary Policy and Exchange Rate Volatility in a Small Open Economy", Review of Economic Studies 72, pp. 707-734 is available at github.com/JohannesPfeifer/DSGE_mod