by macroresearch123 » Wed Nov 06, 2013 8:04 pm
Thank you for the reply jpfeifer -- apologies for not following proper protocol in the initial post. Below is my .mod file, but I will first explain it.
It's a model where households choose between consumption and hours worked, but the environment is determined based off of production choices over energy inputs. The social planner recognizes this can chooses the level of energy used in production optimally. The FOCs are labeled; the third is the only "not completely common" one - just the shadow price on energy. (I must actually make a correction to it, but the error isn't what's preventing the program from running.) The resource constraints are just production = consumption plus investment, the law of motion for the environment, and the law of motion for capital. Thank you again for your time!
%start
periods 100
var c, h, k, ed, S, y;
parameters beta, iota, sigma_c, sigma_s, chi_s, alpha_c, alpha_f,...
eta_h, eta_c, eta_d, sigma_h, sigma_e, theta, delta, zetak,...
zetae, g, gamma, xi, rho, nsigma_e, nsigma_h, nsigma_c,...
nsigma_s, tau_c, tau_x, tau_d, tau_h, tau_k;
%%
%PARAMETERS
beta=.992; %discount rate
iota=.64; %share parameter b/w consumption and nested labor-environment
sigma_c=5.32; %subst b/w consumption and nested labor-environment
sigma_s=1.33; %subst b/w leisure and environmental quality
chi_s=.95; %share of leisure versus environmental quality
alpha_c=.94; %share of general consumption good
alpha_f=.06; %share of family services consumption good
eta_h=.97; %share b/w Cobb Douglas capital-labor and nested CES energy
eta_c=.5; %share parameter for clean energy
eta_d=.5; %share parameter for dirty energy
sigma_h=.02; %subst b/w Cobb Douglas capital-labor and nested CES energy
sigma_e=.02; %subst b/w clean and dirty energy
theta=.33; %share on capital to labor
delta=.0253; %depreciation
zetak=.213; %marginal adjustment costs for capital
zetae=zetak; %convex energy extraction costs
g=.03; %balanced growth
gamma=.001; %pollution parameters, regeneration
xi=.8; rho=.8; %emissions and pollution intensity
%abbreviations
nsigma_e=(sigma_e-1)/sigma_e;
nsigma_h=(sigma_h-1)/sigma_h;
nsigma_c=(sigma_c-1)./sigma_c; %"net" sigma c
nsigma_s=(sigma_s-1)./sigma_s; %net sigma s
%taxes, dummies for now
tau_c=.2; %consumption tax
tau_x=.2; %investment tax
tau_d=.1; %carbon tax
tau_h=.3; %labor income tax
tau_k=.2; %capital income tax
model;
%FOC 1 - Intertemporal Euler equation
(c^(-1/sigma_c))*((iota*(c^nsigma_c)+(1-iota)*(chi_s*... %"PSI"
(S^nsigma_s)+(1-chi_s)*((1-h)^nsigma_s))^(nsigma_c/nsigma_s))...
^(1/nsigma_c))=beta*(c(1)^(-1/sigma_c))*((iota*(c(1)^nsigma_c)+...
(1-iota)*(chi_s*(S(1)^nsigma_s)+(1-chi_s)*((1-h(1))^...
nsigma_s))^(nsigma_c/nsigma_s))^(1/nsigma_c))*(1+... %MPk ahead
(eta_h.*theta.*((h./k).^(1-theta))).*(KH.^(-1./sigma_h)).*...
(eta_h.*(KH.^(1./sigma_h))+(1-eta_h).*(ed.^(1./sigma_h))));
%FOC 2 - Intratemporal Euler equation
(iota*(c^(-1/sigma_c)))/((1-iota)*(1-chi_s)*...
(h^(-1/sigma_s)).*... %note: psi's cancel out
((chi_s*(S^nsigma_s)+(1-chi_s)*((1-h)^nsigma_s))))=... (1/MP_h ahead)
(1/((eta_h*(1-theta)*((k/h)^theta))*...
(((k^theta)*(h.^(1-theta)))^(-1/sigma_h))*...
(eta_h*(((k^theta)*(h.^(1-theta)))^(1/sigma_h))+...
(1-eta_h)*(ed^(1/sigma_h)))));
%FOC 3 - Shadow price on energy
((1-iota)*chi_s*((chi_s*(S^nsigma_s)+(1-chi_s)*((1-h)^nsigma_s))))*...
((iota*(c^nsigma_c)+(1-iota)*(chi_s*... %"PSI"
(S^nsigma_s)+(1-chi_s)*((1-h)^nsigma_s))^(nsigma_c/nsigma_s))...
^(1/nsigma_c))=(1-eta_h)*(ed^(-1/sigma_h))*((eta_h*... %MP_energy
(((k^theta)*(h^(1-theta)))^nsigma_h)+(1-eta_h)*...
(ed^nsigma_h))^(1/(sigma_h-1)));
%Resource constraint for production
y=(eta_h.*(KH.^nsigma_h).^(1./nsigma_h)+...
(1-eta_h).*(ed.^nsigma_h).^(1./nsigma_h)); %production
%Capital law of motion
k(1)=(1-delta)*k + (y-c); %investment = y-c
%Environmental
S(1)=S*(1+gamma)-ed*(xi+rho);
end;
initval;
k=1;
c=1;
h=.3;
S=1;
ed=1;
y=1;
end;
steady;
stoch_simul(dr_algo=0,periods=100); datasaver('simudata',[]);
%finish