# Incorporate depreciation rate shock into Gali et al (2007)'s DSGE model

Hello everyone, I’m trying to incorporate depreciation shock into Gali et al (2007)'s linear dsge model but I ran into some problems.
Firstly, I define u as the utilization rate and delta_1 as the depreciation rate. There is a relationship between delta_1 and u: if u decreases delta_1 decreases and vice versa (this is not one to one relationship).
Secondly, I changed the capital accumulation (line 61): *k = deltainvestment + ( 1 - delta - delta_1(u - 1) - delta_2/2*(u-1)^2)k(-1);
I then add a simple linear equation to represent the relationship between u and delta_1 (line 62): delta_1 = phi_delta1*u;
I then add a simple linear equation to represent the AR process of delta_1 (line 63): delta_1 = rho_delta1*delta_1(-1) + epsilon_delta1
I encountered this problem:
ERROR: If the model is declared linear the second derivatives must be equal to zero.

• ``````  The following equations have non-zero second derivatives:*
``````
• ``````  * Eq # 3 [k]*
``````

Here is the mod file:
dep_shock_gali_2007.mod (2.9 KB)
Here is the article that I try to replicate:
(Gali et al, 2007) Understanding Government Spending on Consumption.pdf (394.8 KB)

I’m not sure how to fix this problem so I would love to hear feedback from you! Thank you in advanced

You are using a linear version of the model, but the capital accumulation equations with its square is clearly not linear.