I have simulated a two country rbc model as in Kim and Kim (web.cas.suffolk.edu/faculty/hkim/paper/transfer6.pdf ) and now I would like to measure how conditional welfare changes, changing a certain parameter (controlled by government) as they do in the paper.
As suggested here (Welfare cost of business cycles) i have added the following formula in the linearized model:
where u is the linearized utility function.
and simulated for 100000 periods.
But what i get in the oo_.mean is that the welfare mean is 0, as all the other variables.
Of course I’m missing something, maybe has something to do with the fact that my model is linear and i am using the linearized version of the utility function?
Thanks in advance!
If your model is (log-)linearised, then all variables are expressed in deviations from the steady-state thus at steady state they are zero. My guess would be that you have to compare the two steady-states, each for different values of the parameter. But this seems to be more like what they call “welfare” (see table 1, notes below). According to their definition, “Conditional welfare is calculated by taking discounted sum of utility over time (time period is set at 500 periods) following a one-time change in κ.”. It seems to me that you need to calculate the accumulated sum of the responses up to 500 periods. In a stationary model the (non-accumulated) response will by definition go to zero.
Btw, what shocks are you simulating?
Hi and thanks for the answer! In the model i have shocks for technology and taxes but I only shock productivity as done in the original paper.
As you say I should take the discounted sum of utility over time, and compare different results for different parameter as in kim and kim:
I guess the discounted sum is the welfare formula I wrote in the previous post:
My problem is which number to take in order to do the comparison. As you seem to suggest I should use the “accumulated sum of the response” for 500 periods. In my understanding this mean:
sum(welfare_ea) where welfare_ea is the impulse response to a productivity shock. Is this correct? Unfortunately I don’t really understand what this sum should represent…
-An alternative would be to sum up the simulated endogenous variable (using periods=500 in the stoch_simul command) but also in this case I am not sure of what I would obtain.
This is how understand this statement, for what concerns conditional welfare: You solve the model for k=0, this is your steady-state. Your shock is effectively k, so instead of having k as a parameter you have it as an exoganous variable lke:
From that, you get impulse responses from a one time deviation in kappa, i.e. a temorary shock epsilon_kappa=1 for one period, and zero after. I do not see where/why you need techno or any other shock…
As for discounted utility, I am not sure if what you do matches exactly it. What I would do is to simply evaluate your utility function - i.e. utility = function of consumption and leisure - and introduce it as a variable in the model. Together with all the variables, you will get impulse responses from a shock in kappa. Get 500 responses and accumulate all them, but discounted, i.e. :
You know dynare saves responses in
oo_.irfs . Extract the responses from there and use a matlab command to construct discounted utility as above.
I don’t think simulated values is what you need.
That’s what I would do, but note that I am not an expert in this and I haven’t read the paper.
Hi and thanks a lot for the answer! I understand what you mean, I am going to try what you suggest and let you know if it works.
My only concern now, is that my model is linearized and expressed in deviation from steady state. So I can add the utility function as a variable but not in levels (as told in my first post).
Do you think I should use the model in levels before implementing your suggestions? In this way I could add the original (in levels) utility function.
Admittedly I did not think of linearisation. I guess yes, to talk about welfare is better to use non-linearised utility function… Of course, if you introduce it in Dynare it will linearise it…
I don’t understand what you mean by this:
[quote]Do you think I should use the model in levels before implementing your suggestions? In this way I could add the original (in levels) utility function.
I mean, the model will be linearised to get a solution right?
My statement was about how practically implement the model in dynare. As you know is possible to introduce the model in levels, declaring the initial values or in linear form. In the first case dynare will linearise the model to get a solution as you were saying. I guess that in order to calculate the welfare is necessary to write the model in levels as you suggest.
Originally my model was implemented in linear form and I could not introduce a formula for the utility in levels in that setup. Unfortunately at the moment I am not able to write the model in levels (I am having some issues with initial values) but as soon as I get the correct model I hope to end up with a welfare solution as close as possible to the original one.
Be careful, because even if you introduce the model in levels, Dynare will linearise it, including the utility function… I would suggest to ask someone how you can do welfare analysis in linearised models. Otherwise, do deterministic simulations.
You cannot do welfare computations on a purely linearized model. You should use a second order approximation. At a minimum, if certain conditions are met (see Woodford (2002)), a linear-quadratic approach might be sufficient. But linearly approximating the welfare function does not make sense. Because of certainty equivalence at first order, you will always get the welfare at the deterministic steady state at order 1.