Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update of use of USDA cost shares #741

Merged
merged 10 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]

### changed
- **38_factor_costs** updated use of USDA cost shares
- **inputdata** changed GDP base year from 2005USD to 2017USD
- **config** changed default input data to use 2017USD
- **module_documentation** all references to USD05 changed to USD17
Expand Down
6 changes: 3 additions & 3 deletions config/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ cfg$model <- "main.gms" #def = "main.gms"
#### input settings ####

# which input data sets should be used?
cfg$input <- c(regional = "rev4.114_h12_magpie.tgz",
cellular = "rev4.114_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz",
validation = "rev4.114_h12_validation.tgz",
cfg$input <- c(regional = "rev4.114_testUSDAupdate_v7_h12_magpie.tgz",
cellular = "rev4.114_testUSDAupdate_v7_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz",
validation = "rev4.114_testUSDAupdate_v7_h12_validation.tgz",
additional = "additional_data_rev4.57.tgz",
calibration = "calibration_H12_27Sep24.tgz")

Expand Down
2 changes: 0 additions & 2 deletions modules/36_employment/exo_may22/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ parameters
pm_productivity_gain_from_wages(t,i) Multiplicative factor describing productivity gain related to higher wages (1)
p36_total_hours_worked(iso) Total hours worked by all employed people (mio. hours per year)
p36_calibration_hourly_costs(iso) Additive calibration term for hourly labor costs (USD17MER per hour)
p36_cost_share(t,i) Capital share of factor costs (1)
p36_share_calibration(i) Additive calibration term for capital shares (1)
p36_nonmagpie_labor_costs(t,i) Labor costs from subsidies and Value of Production not covered by MAgPIE (mio. USD17MER)
;

Expand Down
16 changes: 0 additions & 16 deletions modules/36_employment/exo_may22/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,3 @@ $ondelim
$include "./modules/36_employment/exo_may22/input/f36_nonmagpie_factor_costs.csv"
$offdelim
;

parameter f36_regr_cap_share(reg36) Parameters for dynamic regression
/
$ondelim
$include "./modules/36_employment/exo_may22/input/f36_regression_cap_share.csv"
$offdelim
/
;

table f36_hist_cap_share(t_all,i) Historical capital share
$ondelim
$include "./modules/36_employment/exo_may22/input/f36_historical_share.csv"
$offdelim
;


4 changes: 1 addition & 3 deletions modules/36_employment/exo_may22/input/files
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ f36_historic_hourly_labor_costs.csv
f36_regression_hourly_labor_costs.csv
f36_historic_ag_employment.csv
f36_unspecified_subsidies.csv
f36_nonmagpie_factor_costs.csv
f36_regression_cap_share.csv
f36_historical_share.csv
f36_nonmagpie_factor_costs.csv
10 changes: 1 addition & 9 deletions modules/36_employment/exo_may22/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@
*** | MAgPIE License Exception, version 1.0 (see LICENSE file).
*** | Contact: [email protected]

* capital cost share to split non-magpie factor costs into labor and capital
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"));

if (m_year(t)<2010,
p36_cost_share(t,i) = f36_hist_cap_share(t,i);
elseif (m_year(t)>=2010),
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);
);

*' @code

Expand All @@ -21,7 +13,7 @@ elseif (m_year(t)>=2010),
*' are both kept constant for future years.

p36_nonmagpie_labor_costs(t,i) = (f36_unspecified_subsidies(t,i) + f36_nonmagpie_factor_costs(t,i)) *
(1-p36_cost_share(t,i)) * (1/pm_productivity_gain_from_wages(t,i)) *
(pm_factor_cost_shares(t,i,"labor")) * (1/pm_productivity_gain_from_wages(t,i)) *
(pm_hourly_costs(t,i,"scenario") / pm_hourly_costs(t,i,"baseline"));

*' @stop
5 changes: 3 additions & 2 deletions modules/38_factor_costs/input/files
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* list of files that are required here
f38_historical_share.csv
f38_historical_share_iso.csv
f38_regression_cap_share.csv
f38_fac_req_fao.csv
f38_fac_req_fao_regional.cs4
f38_fac_req_fao_regional.cs4
f38_hist_factor_costs_iso.csv
7 changes: 4 additions & 3 deletions modules/38_factor_costs/per_ton_fao_may22/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ vm_cost_prod_crop(i,factors) Regional factor costs of capital and labor for
;

parameter
pm_cost_share_crops(t,i,factors) Capital and labor shares of the regional factor costs for crop production (1)
p38_share_calibration(i) Summation factor used to calibrate calculated capital shares with historical values (1)
i38_fac_req(t_all,i,kcr) Factor requirements (USD17MER per tDM)
p38_capital_cost_shares_iso(t,iso) Capital shares of factor costs on iso level (1)
p38_share_calibration(iso) Summation factor used to calibrate calculated capital shares with historical values (1)
pm_factor_cost_shares(t,i,factors) Capital and labor shares of factor costs on regional level (1)
i38_fac_req(t_all,i,kcr) Factor requirements (USD17MER per tDM)
;

*#################### R SECTION START (OUTPUT DECLARATIONS) ####################
Expand Down
4 changes: 2 additions & 2 deletions modules/38_factor_costs/per_ton_fao_may22/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

q38_cost_prod_crop_labor(i2) ..
vm_cost_prod_crop(i2,"labor") =e= sum(kcr, vm_prod_reg(i2,kcr) * sum(ct,i38_fac_req(ct,i2,kcr))) *
sum(ct,pm_cost_share_crops(ct,i2,"labor") * (1/pm_productivity_gain_from_wages(ct,i2)) *
sum(ct,pm_factor_cost_shares(ct,i2,"labor") * (1/pm_productivity_gain_from_wages(ct,i2)) *
(pm_hourly_costs(ct,i2,"scenario") / pm_hourly_costs(ct,i2,"baseline")));

q38_cost_prod_crop_capital(i2) ..
vm_cost_prod_crop(i2,"capital") =e= sum(kcr, vm_prod_reg(i2,kcr) * sum(ct,i38_fac_req(ct,i2,kcr))) *
sum(ct,pm_cost_share_crops(ct,i2,"capital"));
sum(ct,pm_factor_cost_shares(ct,i2,"capital"));

*' The factor costs for crops `vm_cost_prod_crop` are calculated as product of
*' production quantity `vm_prod_reg` and crop-specific factor requirements
Expand Down
10 changes: 8 additions & 2 deletions modules/38_factor_costs/per_ton_fao_may22/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ $offdelim
/
;

table f38_historical_share(t_all,i) Historical capital share
table f38_historical_share(t_all,iso) Historical capital share
$ondelim
$include "./modules/38_factor_costs/input/f38_historical_share.csv"
$include "./modules/38_factor_costs/input/f38_historical_share_iso.csv"
$offdelim
;

table f38_hist_factor_costs(t_all,iso) Historical factor costs for crop and livestock (mio USD17MER)
$ondelim
$include "./modules/38_factor_costs/input/f38_hist_factor_costs_iso.csv"
$offdelim
;
18 changes: 18 additions & 0 deletions modules/38_factor_costs/per_ton_fao_may22/preloop.gms
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK)
*** | authors, and contributors see CITATION.cff file. This file is part
*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of
*** | AGPL-3.0, you are granted additional permissions described in the
*** | MAgPIE License Exception, version 1.0 (see LICENSE file).
*** | Contact: [email protected]

* calculate capital cost shares from regression
p38_share_calibration(iso) = f38_historical_share("y2010",iso) - (f38_reg_parameters("slope") *
deleip marked this conversation as resolved.
Show resolved Hide resolved
log10(im_gdp_pc_ppp_iso("y2010",iso)) + f38_reg_parameters("intercept"));

p38_capital_cost_shares_iso(t,iso)$(m_year(t)<2010) = f38_historical_share(t,iso);
p38_capital_cost_shares_iso(t,iso)$(m_year(t)>=2010) = f38_reg_parameters("slope") * log10(im_gdp_pc_ppp_iso(t,iso)) + f38_reg_parameters("intercept") + p38_share_calibration(iso);

* aggregate factor cost shares
pm_factor_cost_shares(t,i,"capital") = (1/sum(i_to_iso(i,iso), f38_hist_factor_costs("y2010",iso))) *
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does pm_factor_cost_shares have a time dimenson, if only "y2010" is used? why is only 2010 used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the aggregation is done for all years, but we use fixed 2010 values for the aggregation weight (p38_capital_cost_shares_iso in the next line also has the time dimension)

sum(i_to_iso(i,iso), f38_hist_factor_costs("y2010",iso) * p38_capital_cost_shares_iso(t,iso));
pm_factor_cost_shares(t,i,"labor") = 1 - pm_factor_cost_shares(t,i,"capital");
11 changes: 0 additions & 11 deletions modules/38_factor_costs/per_ton_fao_may22/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,3 @@ elseif m_year(t)>=2010,
else
i38_fac_req(t,i,kcr) = i38_fac_req(t,i,kcr);
);

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"));

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

elseif (m_year(t)>=2010),
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);
pm_cost_share_crops(t,i,"labor") = 1 - pm_cost_share_crops(t,i,"capital");
);
1 change: 1 addition & 0 deletions modules/38_factor_costs/per_ton_fao_may22/realization.gms
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ $Ifi "%phase%" == "declarations" $include "./modules/38_factor_costs/per_ton_fao
$Ifi "%phase%" == "input" $include "./modules/38_factor_costs/per_ton_fao_may22/input.gms"
$Ifi "%phase%" == "equations" $include "./modules/38_factor_costs/per_ton_fao_may22/equations.gms"
$Ifi "%phase%" == "scaling" $include "./modules/38_factor_costs/per_ton_fao_may22/scaling.gms"
$Ifi "%phase%" == "preloop" $include "./modules/38_factor_costs/per_ton_fao_may22/preloop.gms"
$Ifi "%phase%" == "presolve" $include "./modules/38_factor_costs/per_ton_fao_may22/presolve.gms"
$Ifi "%phase%" == "postsolve" $include "./modules/38_factor_costs/per_ton_fao_may22/postsolve.gms"
*######################## R SECTION END (PHASES) ###############################
5 changes: 3 additions & 2 deletions modules/38_factor_costs/sticky_feb18/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ parameters
p38_capital_immobile(t,j,kcr) Preexisting immobile capital stocks before investment (mio USD17MER)
p38_capital_mobile(t,j) Preexisting mobile capital stocks before investment (mio USD17MER)

pm_cost_share_crops(t,i,factors) Capital and labor shares of the regional factor costs for crop production (1)
p38_share_calibration(i) Summation factor used to calibrate calculated capital shares with historical values (1)
p38_capital_cost_shares_iso(t,iso) Capital shares of factor costs on iso level (1)
p38_share_calibration(iso) Summation factor used to calibrate calculated capital shares with historical values (1)
pm_factor_cost_shares(t,i,factors) Capital and labor shares of factor costs on regional level (1)

p38_croparea_start(j,w,kcr) Agricultural land initialization area (mio. ha)

Expand Down
10 changes: 8 additions & 2 deletions modules/38_factor_costs/sticky_feb18/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,14 @@ $offdelim
/
;

table f38_historical_share(t_all,i) Historical capital share
table f38_historical_share(t_all,iso) Historical capital share
$ondelim
$include "./modules/38_factor_costs/input/f38_historical_share.csv"
$include "./modules/38_factor_costs/input/f38_historical_share_iso.csv"
$offdelim
;

table f38_hist_factor_costs(t_all,iso) Historical factor costs for crop and livestock (mio USD17MER)
$ondelim
$include "./modules/38_factor_costs/input/f38_hist_factor_costs_iso.csv"
$offdelim
;
3 changes: 2 additions & 1 deletion modules/38_factor_costs/sticky_feb18/input/files
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* list of files that are required here
f38_region_yield.csv
f38_historical_share.csv
f38_historical_share_iso.csv
f38_regression_cap_share.csv
f38_fac_req_fao.csv
f38_hist_factor_costs_iso.csv
18 changes: 18 additions & 0 deletions modules/38_factor_costs/sticky_feb18/preloop.gms
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK)
*** | authors, and contributors see CITATION.cff file. This file is part
*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of
*** | AGPL-3.0, you are granted additional permissions described in the
*** | MAgPIE License Exception, version 1.0 (see LICENSE file).
*** | Contact: [email protected]

* calculate capital cost shares from regression
p38_share_calibration(iso) = f38_historical_share("y2010",iso) - (f38_reg_parameters("slope") *
log10(im_gdp_pc_ppp_iso("y2010",iso)) + f38_reg_parameters("intercept"));

p38_capital_cost_shares_iso(t,iso)$(m_year(t)<2010) = f38_historical_share(t,iso);
p38_capital_cost_shares_iso(t,iso)$(m_year(t)>=2010) = f38_reg_parameters("slope") * log10(im_gdp_pc_ppp_iso(t,iso)) + f38_reg_parameters("intercept") + p38_share_calibration(iso);

* aggregate factor cost shares
pm_factor_cost_shares(t,i,"capital") = (1/sum(i_to_iso(i,iso), f38_hist_factor_costs("y2010",iso))) *
sum(i_to_iso(i,iso), f38_hist_factor_costs("y2010",iso) * p38_capital_cost_shares_iso(t,iso));
pm_factor_cost_shares(t,i,"labor") = 1 - pm_factor_cost_shares(t,i,"capital");
17 changes: 3 additions & 14 deletions modules/38_factor_costs/sticky_feb18/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ if (smax(j, pm_labor_prod(t,j)) <> 1 OR smin(j, pm_labor_prod(t,j)) <> 1,
abort "This factor cost realization cannot handle labor productivities != 1"
);

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"));

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

elseif (m_year(t)>=2010),
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);
pm_cost_share_crops(t,i,"labor") = 1 - pm_cost_share_crops(t,i,"capital");
);

* choosing between regional (+time dependent) or global (from 2005) factor requirements
$if "%c38_fac_req%" == "glo" i38_fac_req(t,i,kcr) = f38_fac_req(kcr);
$if "%c38_fac_req%" == "reg" i38_fac_req(t,i,kcr) = f38_fac_req_fao_reg(t,i,kcr);
Expand All @@ -32,9 +21,9 @@ else
i38_fac_req(t,i,kcr) = i38_fac_req(t,i,kcr);
);

p38_labor_need(t,i,kcr) = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"labor");
p38_capital_need(t,i,kcr,"mobile") = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * (1-s38_immobile);
p38_capital_need(t,i,kcr,"immobile") = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * s38_immobile;
p38_labor_need(t,i,kcr) = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"labor");
p38_capital_need(t,i,kcr,"mobile") = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * (1-s38_immobile);
p38_capital_need(t,i,kcr,"immobile") = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * s38_immobile;

if (ord(t) = 1,

Expand Down
1 change: 1 addition & 0 deletions modules/38_factor_costs/sticky_feb18/realization.gms
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ $Ifi "%phase%" == "declarations" $include "./modules/38_factor_costs/sticky_feb1
$Ifi "%phase%" == "input" $include "./modules/38_factor_costs/sticky_feb18/input.gms"
$Ifi "%phase%" == "equations" $include "./modules/38_factor_costs/sticky_feb18/equations.gms"
$Ifi "%phase%" == "scaling" $include "./modules/38_factor_costs/sticky_feb18/scaling.gms"
$Ifi "%phase%" == "preloop" $include "./modules/38_factor_costs/sticky_feb18/preloop.gms"
$Ifi "%phase%" == "presolve" $include "./modules/38_factor_costs/sticky_feb18/presolve.gms"
$Ifi "%phase%" == "postsolve" $include "./modules/38_factor_costs/sticky_feb18/postsolve.gms"
*######################## R SECTION END (PHASES) ###############################
7 changes: 4 additions & 3 deletions modules/38_factor_costs/sticky_labor/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ parameters
p38_capital_immobile(t,j,kcr) Preexisting immobile capital stocks before investment (mio USD17MER)
p38_capital_mobile(t,j) Preexisting mobile capital stocks before investment (mio USD17MER)

pm_cost_share_crops(t,i,factors) Capital and labor shares of the regional factor costs for crop production (1)
p38_share_calibration(i) Summation factor used to calibrate calculated capital shares with historical values (1)
p38_capital_cost_shares_iso(t,iso) Capital shares of factor costs on iso level (1)
p38_share_calibration(iso) Summation factor used to calibrate calculated capital shares with historical values (1)
deleip marked this conversation as resolved.
Show resolved Hide resolved
pm_factor_cost_shares(t,i,factors) Capital and labor shares of factor costs on regional level (1)
p38_min_labor_share(t,j) Minimum labor share out of labor plus capital needed (1)

p38_croparea_start(j,w,kcr) Agricultural land initialization area (mio. ha)
Expand All @@ -54,7 +55,7 @@ parameters
ov38_investment_mobile(t,j,type) Investment costs in mobile farm capital (mio USD17MER per yr)
ov38_laborhours_need(t,j,kcr,type) Labor required per unit of output (hours per ton DM)
ov38_capital_need(t,j,kcr,mobil38,type) Captial required per unit of output (USD17MER per ton DM)
ov38_relax_CES_lp(t,j,kcr,type) Variable to make CES function feasible in linearized model (1)
ov38_relax_CES_lp(t,j,kcr,type) Variable to make CES function feasible in linearized model (1)
oq38_cost_prod_labor(t,i,type) Regional labor input costs for crop production (mio USD17MER)
oq38_cost_prod_capital(t,i,type) Regional capital input costs for crop production (mio USD17MER)
oq38_investment_immobile(t,j,kcr,type) Cellular immobile investments into farm capital (mio USD17MER)
Expand Down
10 changes: 8 additions & 2 deletions modules/38_factor_costs/sticky_labor/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@ $offdelim
/
;

table f38_historical_share(t_all,i) Historical capital share
table f38_historical_share(t_all,iso) Historical capital share
$ondelim
$include "./modules/38_factor_costs/input/f38_historical_share.csv"
$include "./modules/38_factor_costs/input/f38_historical_share_iso.csv"
$offdelim
;

table f38_hist_factor_costs(t_all,iso) Historical factor costs for crop and livestock (mio USD17MER)
$ondelim
$include "./modules/38_factor_costs/input/f38_hist_factor_costs_iso.csv"
$offdelim
;
3 changes: 2 additions & 1 deletion modules/38_factor_costs/sticky_labor/input/files
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* list of files that are required here
f38_region_yield.csv
f38_historical_share.csv
f38_historical_share_iso.csv
f38_regression_cap_share.csv
f38_fac_req_fao.csv
f38_hist_factor_costs_iso.csv
14 changes: 9 additions & 5 deletions modules/38_factor_costs/sticky_labor/preloop.gms
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ s38_ces_elast_par = (1/s38_ces_elast_subst) - 1 ;

p38_intr_depr(t,i) = (1-s38_depreciation_rate) * pm_interest(t,i)/(1+pm_interest(t,i)) + s38_depreciation_rate;

* calculate labor/capital cost shares from regression
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"));
* calculate capital cost shares from regression
p38_share_calibration(iso) = f38_historical_share("y2010",iso) - (f38_reg_parameters("slope") *
deleip marked this conversation as resolved.
Show resolved Hide resolved
log10(im_gdp_pc_ppp_iso("y2010",iso)) + f38_reg_parameters("intercept"));

pm_cost_share_crops(t,i,"capital")$(m_year(t)<2010) = f38_historical_share(t,i);
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);
p38_capital_cost_shares_iso(t,iso)$(m_year(t)<2010) = f38_historical_share(t,iso);
p38_capital_cost_shares_iso(t,iso)$(m_year(t)>=2010) = f38_reg_parameters("slope") * log10(im_gdp_pc_ppp_iso(t,iso)) + f38_reg_parameters("intercept") + p38_share_calibration(iso);

pm_cost_share_crops(t,i,"labor") = 1 - pm_cost_share_crops(t,i,"capital");
* aggregate factor cost shares
pm_factor_cost_shares(t,i,"capital") = (1/sum(i_to_iso(i,iso), f38_hist_factor_costs("y2010",iso))) *
deleip marked this conversation as resolved.
Show resolved Hide resolved
sum(i_to_iso(i,iso), f38_hist_factor_costs("y2010",iso) * p38_capital_cost_shares_iso(t,iso));
pm_factor_cost_shares(t,i,"labor") = 1 - pm_factor_cost_shares(t,i,"capital");
Loading
Loading