Setting the welfare loss function

Dear Professor jpfeifer:
I am a bit confused about the setting of the welfare loss function. My model has been log linearized. When I try to add the recursive equation of the welfare function, he always reminds me that the function setting is wrong, the error is as follows. Please me how should I deal with it? My patient family welfare loss is set to wei1, the non-patient family welfare loss is set to wei2, and the total welfare loss is set to wei. Are you free to look at the model for me? Grateful.
If the model is declared linear the second derivatives must be equal to zero.
The following equations have non-zero second derivatives
zzz.mod (3.8 KB)

If a log() of a variables shows up, the equation is obviously nonlinear. Also note that welfare evaluation generally requires a full second order approximation.

Hello, Professor jpfeifer. I have one more question. My model has been log linearized. When performing welfare analysis, if a utility function is added to the model, can’t the consumption be log-linearized consumption? Or should the logarithmic linearized variable be added to the steady state?
The utility function I want to set is:GNVPLU6BUEBO)8L`33D72

That is not the point. Welfare depends on second-order properties.

Hi @jpfeifer ,

I have some questions on how to compute welfare using a log linearized model. You mentioned that:

  1. To obtain my model equations, I log linearized around a steady state of zero just like Justiniano and Preston (2010). When I estimate the model, I get the message bellow in the log file. Does that mean my model is estimated in second order approximation?

Starting preprocessing of the model file …
Found 34 equation(s).
Evaluating expressions…done
Computing static model derivatives (order 2).
Computing static model derivatives w.r.t. parameters (order 2).
Computing dynamic model derivatives (order 2).
Computing dynamic model derivatives w.r.t. parameters (order 2).
Processing outputs …

  1. How do compute consumption equivalence and conduct welfare analysis using a log linear model like Justiniano and Preston (2010). I would appreciate if you could share with me any paper and codes that does that?

Generally, you cannot use a loglinear model for welfare analysis. It will yield wrong results because welfare depends on second order terms (unless you have an undistorted steady state).
Dynare’s preprocessor output does not provide meaningful information. You can approximate a linear system up to an arbitrary order, but the higher order terms will simply be 0.