# ############################################################################ # This file is a part of gEcon.iosam. # # # # (c) Chancellery of the Prime Minister of the Republic of Poland 2014-2015 # # (c) Marta Retkiewicz 2015-2016 # # Licence terms can be found in the file: # # http://gecon.r-forge.r-project.org/files/gEcon.iosam_licence.txt # # # # Author: Marta Retkiewicz # # ############################################################################ # Example for gEcon.iosam package: calibration of a CGE model # ############################################################################ options { output LaTeX = TRUE; output LaTeX landscape = TRUE; output logfile = TRUE; }; indexsets { SEC = { 'A' .. 'C' }; HH = { 's', 'l' }; }; block CONSUMER { definitions { u[] = (SUM(alpha * D[]^((omega - 1)/omega)))^(omega/(omega - 1)); }; controls { D[]; # Household h demand for good s }; objective { U[] = u[]; }; constraints { INC[] = SUM(D[] * p[]); }; identities { INC[] = K[] * p_k[] + L[] * p_l[] + CAP[]; }; calibration { D[] = d_data * scale^(-1) -> alpha; SUM(alpha^omega) = 1 -> alpha<'A', h>; }; }; block SECTOR { controls { Y[], K[], L[], Y_VA[], Y_INT[]; }; objective { pi[] = Y[] * p[] - (K[] * p_kc[] + L[] * p_lc[]) - SUM(Y_INT[] * p[] / beta_x); }; constraints { # A two-level Leontief production function Y[] = Y_VA[]; Y[] = Y_INT[]; Y_VA[] = gamma_yva * K[]^beta_k * L[]^beta_l; }; identities { X[] = Y_INT[] / beta_x; }; calibration { beta_k + beta_l = 1 -> beta_k; L[] = l_data -> beta_l; Y_VA[] = y_data -> gamma_yva; X[] = x_data -> beta_x; }; }; block EQUILIBRIUM { identities { p_l[] = 1; # Numeraire p[] = 1; KS[] = SUM(K[]); KS[] = ks_data; K[] = KS[] * owc * scale^(-1); LS[] = ls_data; L[] = LS[] * oww * scale^(-1); p_kc[] = p_k[]; p_lc[] = p_l[]; PI[] = SUM(pi[]); # Firm K_f[] = PI[] + KS[] * owc_f; CAP[] = K_f[] * owf * scale^(-1); }; calibration { CAP[] = cap_data * scale^(-1) -> owf; SUM(owf) = 1 -> owf<'s'>; L[] = l_data * scale^(-1) -> oww; SUM(oww) = 1 -> oww<'s'>; K[] = k_data * scale^(-1) -> owc; K_f[] = k_f_data -> owc_f; } };