Skip to content

Commit 2d2c3d6

Browse files
author
Debbora Leip
committed
update in livestock regression and cost share regressions
1 parent 82c5f15 commit 2d2c3d6

File tree

11 files changed

+11
-19
lines changed

11 files changed

+11
-19
lines changed

config/default.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ cfg$model <- "main.gms" #def = "main.gms"
2525
cfg$input <- c(regional = "rev4.112_h12_magpie.tgz",
2626
cellular = "rev4.112_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz",
2727
validation = "rev4.112_h12_magpie.tgz",
28-
additional = "additional_data_rev4.55.tgz",
28+
additional = "additional_data_rev4.56.tgz",
2929
calibration = "calibration_H12_26Mar24_fixed.tgz")
3030

3131
# NOTE: It is recommended to recalibrate the model when changing cellular input data

modules/15_food/anthro_iso_jun22/equations.gms

-2
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,6 @@ q15_regr_kcal(iso) ..
165165
*' This equation estimates key dietary composition regressision factors,
166166
*' such as the share of animal products, empty calories, or
167167
*' fruits, vegetables and nuts.
168-
*' Note that regression coefficients are still based on USD05PPP values, but apllied
169-
*' to income in USD17PPP since monetary units in MAgPIE have been updated.
170168

171169
q15_regr(iso, regr15) ..
172170
v15_demand_regr(iso, regr15) =e=

modules/15_food/anthropometrics_jan18/equations.gms

-2
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,6 @@ q15_regr_kcal(iso) ..
165165
*' This equation estimates key dietary composition regressision factors,
166166
*' such as the share of animal products, empty calories, or
167167
*' fruits, vegetables and nuts.
168-
*' Note that regression coefficients are still based on USD05PPP values, but apllied
169-
*' to income in USD17PPP since monetary units in MAgPIE have been updated.
170168

171169
q15_regr(iso, regr15) ..
172170
v15_demand_regr(iso, regr15) =e=

modules/36_employment/exo_may22/presolve.gms

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
*** | Contact: [email protected]
77

88
* capital cost share to split non-magpie factor costs into labor and capital
9-
p36_share_calibration(i) = f36_hist_cap_share("y2010",i)-(f36_regr_cap_share("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso("y2010",iso)))+f36_regr_cap_share("intercept"));
9+
p36_share_calibration(i) = f36_hist_cap_share("y2010",i)-(f36_regr_cap_share("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso("y2010",iso) * fm_gdp_defl_ppp(iso))))+f36_regr_cap_share("intercept"));
1010

1111
if (m_year(t)<2010,
1212
p36_cost_share(t,i) = f36_hist_cap_share(t,i);
1313
elseif (m_year(t)>=2010),
14-
p36_cost_share(t,i) = f36_regr_cap_share("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso(t,iso)))+f36_regr_cap_share("intercept")+p36_share_calibration(i);
14+
p36_cost_share(t,i) = f36_regr_cap_share("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso(t,iso) * fm_gdp_defl_ppp(iso))))+f36_regr_cap_share("intercept")+p36_share_calibration(i);
1515
);
1616

1717
*' @code

modules/38_factor_costs/per_ton_fao_may22/presolve.gms

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ else
2121
i38_fac_req(t,i,kcr) = i38_fac_req(t,i,kcr);
2222
);
2323

24-
p38_share_calibration(i) = f38_historical_share("y2010",i)-(f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso("y2010",iso)))+f38_reg_parameters("intercept"));
24+
p38_share_calibration(i) = f38_historical_share("y2010",i)-(f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso("y2010",iso) * fm_gdp_defl_ppp(iso))))+f38_reg_parameters("intercept"));
2525

2626
if (m_year(t)<2010,
2727
pm_cost_share_crops(t,i,"capital") = f38_historical_share(t,i);
2828
pm_cost_share_crops(t,i,"labor") = 1 - f38_historical_share(t,i);
2929

3030
elseif (m_year(t)>=2010),
31-
pm_cost_share_crops(t,i,"capital") = f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso(t,iso)))+f38_reg_parameters("intercept")+p38_share_calibration(i);
31+
pm_cost_share_crops(t,i,"capital") = f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso(t,iso) * fm_gdp_defl_ppp(iso))))+f38_reg_parameters("intercept")+p38_share_calibration(i);
3232
pm_cost_share_crops(t,i,"labor") = 1 - pm_cost_share_crops(t,i,"capital");
3333
);

modules/38_factor_costs/sticky_feb18/presolve.gms

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ if (smax(j, pm_labor_prod(t,j)) <> 1 OR smin(j, pm_labor_prod(t,j)) <> 1,
99
abort "This factor cost realization cannot handle labor productivities != 1"
1010
);
1111

12-
p38_share_calibration(i) = f38_historical_share("y2010",i)-(f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso("y2010",iso)))+f38_reg_parameters("intercept"));
12+
p38_share_calibration(i) = f38_historical_share("y2010",i)-(f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso("y2010",iso) * fm_gdp_defl_ppp(iso))))+f38_reg_parameters("intercept"));
1313

1414
if (m_year(t)<2010,
1515
pm_cost_share_crops(t,i,"capital") = f38_historical_share(t,i);
1616
pm_cost_share_crops(t,i,"labor") = 1 - f38_historical_share(t,i);
1717

1818
elseif (m_year(t)>=2010),
19-
pm_cost_share_crops(t,i,"capital") = f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso(t,iso)))+f38_reg_parameters("intercept")+p38_share_calibration(i);
19+
pm_cost_share_crops(t,i,"capital") = f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso(t,iso) * fm_gdp_defl_ppp(iso))))+f38_reg_parameters("intercept")+p38_share_calibration(i);
2020
pm_cost_share_crops(t,i,"labor") = 1 - pm_cost_share_crops(t,i,"capital");
2121
);
2222

modules/38_factor_costs/sticky_labor/preloop.gms

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ s38_ces_elast_par = (1/s38_ces_elast_subst) - 1 ;
1111
p38_intr_depr(t,i) = (1-s38_depreciation_rate) * pm_interest(t,i)/(1+pm_interest(t,i)) + s38_depreciation_rate;
1212

1313
* calculate labor/capital cost shares from regression
14-
p38_share_calibration(i) = f38_historical_share("y2010",i)-(f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso("y2010",iso)))+f38_reg_parameters("intercept"));
14+
p38_share_calibration(i) = f38_historical_share("y2010",i)-(f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso("y2010",iso) * fm_gdp_defl_ppp(iso)))+f38_reg_parameters("intercept"));
1515

1616
pm_cost_share_crops(t,i,"capital")$(m_year(t)<2010) = f38_historical_share(t,i);
17-
pm_cost_share_crops(t,i,"capital")$(m_year(t)>=2010) = f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso(t,iso)))+f38_reg_parameters("intercept")+p38_share_calibration(i);
17+
pm_cost_share_crops(t,i,"capital")$(m_year(t)>=2010) = f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),(im_gdp_pc_ppp_iso(t,iso) * fm_gdp_defl_ppp(iso))))+f38_reg_parameters("intercept")+p38_share_calibration(i);
1818

1919
pm_cost_share_crops(t,i,"labor") = 1 - pm_cost_share_crops(t,i,"capital");

modules/70_livestock/fbask_jan16/equations.gms

-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ q70_feed(i2,kap,kall) ..
2828
*' productivity trajectories for simplification. Therefore,
2929
*' `i70_cost_regr(i,kli,"cost_regr_b")` is set to zero in the case of livestock
3030
*' products generated in monogastric systems.
31-
*' Note that regression coefficients are still based on USD04MER values, while other
32-
*' monetary units in MAgPIE have been updated to USD17MER.
3331

3432
*' To account for increased hourly labor costs and producitivity in case of an external
3533
*' wage scenario, the total labor costs are scaled by the corresponding increase in hourly

modules/70_livestock/fbask_jan16/input.gms

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ $ondelim
4646
$include "./modules/70_livestock/fbask_jan16/input/f70_livestock_productivity.cs3"
4747
$offdelim;
4848

49-
table f70_cost_regr(kap,cost_regr) Factor requirements livestock (USD04 per tDM (A) and USD (B))
49+
table f70_cost_regr(kap,cost_regr) Factor requirements livestock (USD17MER per tDM (A) and USD17MER (B))
5050
$ondelim
5151
$include "./modules/70_livestock/fbask_jan16/input/f70_capit_liv_regr.csv"
5252
$offdelim

modules/70_livestock/fbask_jan16_sticky/equations.gms

-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ q70_feed(i2,kap,kall) ..
2828
*' productivity trajectories for simplification. Therefore,
2929
*' `i70_cost_regr(i,kli,"cost_regr_b")` is set to zero in the case of livestock
3030
*' products generated in monogastric systems.
31-
*' Note that regression coefficients are still based on USD04MER values, while other
32-
*' monetary units in MAgPIE have been updated to USD17MER.
3331

3432
*' To account for increased hourly labor costs and producitivity in case of an external
3533
*' wage scenario, the total labor costs are scaled by the corresponding increase in hourly

modules/70_livestock/fbask_jan16_sticky/input.gms

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ $ondelim
4848
$include "./modules/70_livestock/fbask_jan16_sticky/input/f70_livestock_productivity.cs3"
4949
$offdelim;
5050

51-
table f70_cost_regr(kap,cost_regr) Factor requirements livestock (USD04 per tDM (A) and USD (B))
51+
table f70_cost_regr(kap,cost_regr) Factor requirements livestock (USD17MER per tDM (A) and USD17MER (B))
5252
$ondelim
5353
$include "./modules/70_livestock/fbask_jan16_sticky/input/f70_capit_liv_regr.csv"
5454
$offdelim

0 commit comments

Comments
 (0)