Hello everyone
I have been asking recently in the forum about welfare analysis, this time I am trying to obtain the consumption equivalent (CE), my utility function is of the form:
E_t\sum_{t=0}^{\infty}\beta^t\left[\xi_tlog\left(C_t\right)-\vartheta\frac{L_{j,\ t}^{1+\varphi}}{1+\varphi}\right]
Due to the consumption preference shock \xi_t, I can’t solve the infinite sum so I’m trying to get the CE numerically, I followed Professor Pfeifer’s link DSGE_mod/Born_Pfeifer_2018/Welfare at master · JohannesPfeifer/DSGE_mod · GitHub and I think I found a mistake, in the file Born_Pfeifer_2018_welfare.mod On the line
lambda_conditional_technology=csolve('get_consumption_equivalent_conditional_welfare',lambda_unconditional_technology,[],1e-8,1000)
I think it should be
lambda_conditional_technology=csolve('get_consumption_equivalent_conditional_welfare',0,[],1e-8,1000)
I am right?
I have an additional doubt related to the calculation of the CE, imagine that I have a given reference welfare level, say, -99.50…, I tried to modify the files of professor Pfeifer to consider this fact, in the part of the csolve that goes in the mod file , I have the following lines
%computed consumption equivalent
options_old=options_;
options_.nocorr=1;
options_.noprint=1;
%lambda_unconditional_technology=csolve('get_consumption_equivalent_unconditional_welfare',0,[],1e-8,1000)
lambda_conditional_technology=csolve('get_consumption_equivalent_conditional_welfare',0,[],1e-8,1000)
options_=options_old;
because I am interested in conditional welfare, however, I have more doubts in the file get_consumption_equivalent_conditional_welfare
. Professor Pfeifer adds two options, use Ramsey or generate the Welfare_gap variable. Since I already have the reference level of welfare (i.e. -99.50…) I think that neither of the two applies. I modified the Ramsey option because I think it is closer to what I want to do, but I don’t know if I did it correctly, I attach the file, however I am almost sure that I have something wrong, since my Recursive_natural_welfare_equivalent variable tells me that the conditional welfare is lower than the wellfare I put as a reference, but the CE I get is negative and the results don’t seem consistent, the biggest change I made to the get_consumption_equivalent_conditional_welfare
file was to put
outvalue=(-99.50670008-Recursive_natural_welfare_equivalent)*100;
instead of
outvalue=(oo_.planner_objective_value(1)-Recursive_natural_welfare_equivalent)*100;
Is this correct? If someone could help me to know how to modify the file considering that I already have the reference level of welfare as given, I would greatly appreciate it.
Greetings to all