December 2016 version notes: Difference between revisions

From Pardee Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 23: Line 23:
'''<u>Variables/Parameter Added</u>'''
'''<u>Variables/Parameter Added</u>'''


aidgradpoint: Aid (foreign), income per capita at which countries no longer qualifies for receiving aid. This is a global parameter.
'''aidgradpoint:''' Aid (foreign), income per capita at which countries no longer qualifies for receiving aid. This is a global parameter.


aidrecm: This will be the new parameter for changing aid received. This works as a multiplier on base calculation. This works at country level.
'''aidrecm: '''This will be the new parameter for changing aid received. This works as a multiplier on base calculation. This works at country level.


AIDREC: This is a new variable that saves the initial value for aid received, by country, as a percentage of GDP
'''AIDREC:'''''This is a new variable that saves the initial value for aid received, by country, as a percentage of GDP''


'''<u>Variables Affected</u>'''
'''<u>Variables Affected</u>'''
Line 102: Line 102:


AIDSDTHS; DEATHS; CDR; LIFEXP; GDP
AIDSDTHS; DEATHS; CDR; LIFEXP; GDP
[[December_2016_vetting|Vetting HIV/AIDS changes]]


== Land and Irrigation ==
== Land and Irrigation ==
Line 165: Line 167:


2. Manually Reset initial year to run, if you have turned on the previous option, you might want to go back to starting the scenario run from the first year. This option allows you to do that without having to go to the Run screen and press the new button.
2. Manually Reset initial year to run, if you have turned on the previous option, you might want to go back to starting the scenario run from the first year. This option allows you to do that without having to go to the Run screen and press the new button.
[[December_2016_vetting|Scenario rerun vetting]]


[[File:RunScreenWithOptionOff.png|frame|right|445x220px|Run Screen with Menu Option 1 turned off.]]
[[File:RunScreenWithOptionOff.png|frame|right|445x220px|Run Screen with Menu Option 1 turned off.]]
Line 174: Line 178:
GDP2011 table is updated from IMF's WEO October growth rates. GDPGrowthRate has also been updated. The HIV peak rate and peak prevalence data has been updated. (Note from Steve: I had some issues loading this into IFsHistSeries through the "merging" interface however, I think because this is a strange series that is not actually a time series - the column headers are "Peak Prevalence" and "peak year". We've also updated central and general tax data that Mohammod found, and WHO data, neither of which are used in the preprocessor. In all, we've updated 51 series.)
GDP2011 table is updated from IMF's WEO October growth rates. GDPGrowthRate has also been updated. The HIV peak rate and peak prevalence data has been updated. (Note from Steve: I had some issues loading this into IFsHistSeries through the "merging" interface however, I think because this is a strange series that is not actually a time series - the column headers are "Peak Prevalence" and "peak year". We've also updated central and general tax data that Mohammod found, and WHO data, neither of which are used in the preprocessor. In all, we've updated 51 series.)


ICTD tax revenue series are also in.
ICTD tax revenue series are also in.&nbsp;The data still has some issues, e.g., data is in ratios to GDP instead of percentages of GDP. These will be fixed in the next version.


= Provincial Model: China&nbsp; =
= Provincial Model: China&nbsp; =
Line 180: Line 184:
Mickey fixed the China provincial model by putting in the right province codes.
Mickey fixed the China provincial model by putting in the right province codes.


= Other Changes =
= Other Changes: Displays =


Mickey fixed some display lists in the International Politics category.
Mickey fixed some display lists in the International Politics category.


Dyadic trade had some display (GUI) changes.
Dyadic trade had some display (GUI) changes.
Table Display now allows saving transpose to Windows Clipboard.


= Previous Version: Version 7.26: Summary of Changes =
= Previous Version: Version 7.26: Summary of Changes =
Line 190: Line 196:
== Economic Growth: Adjustment Factor for External Growth ==
== Economic Growth: Adjustment Factor for External Growth ==


Switch (gdpadjsw) added to save the base case adjustment factor for external growth rate and reapply it during scenario run.
Gdpadjsw switch that was added in version 7.25/7.26 is now turned on (=1) in the base case of the model. This switch will be on by default in any scenario now. As a result, adjustments (read from the base run) will be made so that GDP impacts, if any, are visible in the early years of the model.


== Dyadic Trade ==
== Dyadic Trade ==
Line 210: Line 216:
== Data Update ==
== Data Update ==


A new government debt series (GovtDebtGen%GDP) is added. The series is not used in pre-processor.
A new government debt series (GovtDebtGen%GDP) is added. The series is not used in pre-processor.&nbsp;


== Provincial Model: South Africa ==
== Provincial Model: South Africa ==

Latest revision as of 23:16, 19 December 2016

Model Changes

Foreign Aid

The model for foreign aid is revised with a regression function that will now determine aid received by countries as a share of their GDP. The new function is saved in TablFunc.mdb as

GDP/Capita (PPP 2011) Versus Aid Received as a Percentage of GDP (MostRecent) Log

The logarithmic function, driven by GDP per capita at PPP, shifts aid away from countries as they get richer. At the income level of $14,000 countries no longer qualify to receive foreign aid. This graduation point is made into a new parameter with a base case value of 14k. Implementation of the variable graduation point through a parameter (aidgradpoint) required hard-coding of the function (saved in the TablFunc):

calaidrec = AMAX(0, 5.3753 * Log(aidgradpoint) - 5.3753 * Log(GDPPCP(R%)))

Code Marker

'mti 2016/11/02

Code change for this is in DataEcon,bas and Economy.bas (ForAid routine)

Modeling Note

We haven’t made any changes to the aid donation model. For each of the donor countries, aid donation as a share of GDP stays the same as the initial year value throughout the model horizon. Non-donor countries do not join the club of donors at any point in time even after they get richer later in the horizon. The dollar value of global aid rises with the rise in GDP of donor countries.

Variables/Parameter Added

aidgradpoint: Aid (foreign), income per capita at which countries no longer qualifies for receiving aid. This is a global parameter.

aidrecm: This will be the new parameter for changing aid received. This works as a multiplier on base calculation. This works at country level.

AIDREC:This is a new variable that saves the initial value for aid received, by country, as a percentage of GDP

Variables Affected

AID; GOVREV; GOVEXP; GOVDEBT; FORSAV; POWER

AidDrivers.png

Variable/Parameter Deleted

aidrec: Parameter aidrec used for initializing and changing aid received as a share of GDP is removed and replaced with a new multiplier (aidrecm) on aid received and a new variable (AIDREC) to save initial value.

There are 8 .sce files that contain aidrec. Barry suggested that seven of these, located in the folder IFs\SCENARIO\World Integrated Scenario Sets\Africa\AFI Gatune Africa\, need to be deleted. They are:

  • Lions_hungrier,
  • Lions_hungry,
  • Lions_hungry_no adverse health,
  • Lions_Out _all,
  • Lions_Out _all_no education,
  • Lions_Out _all_no health and
  • Lions_Out _Compromise

There is an eighth one: IFs\SCENARIO\World Integrated Scenario Sets\Hillebrand and Closson En-Eco-Geopol\EcoWorld(6).sce. This scenario uses aidrec to increase the aid receipt of OECD. That doesn’t make sense to me. I think the aidrec line in this scenario can be deleted.

Model Behavior

Foreign aid, net receipts as a percent of GDP for all countries taken from the Web Version of IFs 7.26.

The next figure shows the model behavior before code change. The plot shows foreign aid, net receipts as a percent of GDP for all countries taken from the Web Version of IFs 7.26.

The next figure shows the model behavior after code revision.  

Vetting foreign aid changes

Foreign aid, net receipts as a percent of GDP for all countries taken development version 7.27 B1.

HIV/AIDS

SeriesHIVPeaks data has been updated using output from the Spectrum model. Updated data revised peak years for many countries (e.g., for South Africa the peak changed from 2006 to 2055). Also, there is more data available now for calculating a more recent infection, prevalence and death rates. To be consistent with the new data, Steve had to make several changes to the HIV/AIDS model:

  • References to hard-coded years were replaced with references to baseyear and necessary offset in the pre-processor and the model. Pre-processor also uses IFs internal function to calculate growth rate from data. These changes were on the initialization and computation of HIV infection (hivincr) and prevalence rate (HIVRATE)
  • Computation of death rates (AIDSDRATE) in the model code is revised so that the historical death rate patterns continue in the forecast (e.g., for South Africa)
  • The parameter for the impact of technical advances on reducing AIDS deaths (aidsdrtadvr) is initialized to a higher value to prevent AIDS deaths from growing throughout the model horizon

Replacing Hard-Coded Years with BaseYear

The pre-processor code for annual rate of change in HIV infection rate (hivincr) used data on 2006 and 2004 infection rates, HIV peak year and HIV peakrate data. The revised code uses the annual growth rate function (getAnnualGrowthRate) working on the entire data table, which is updated with this version.  Hard-coded references to years (e.g., 2006, 2004) are replaced with the internal variable Baseyear and appropriate offset.

Note for Steve and/or Barry: There is still a line of code in datapop with hard-coded years:

 If CHIVPEAKYR(ICount%) = 2100 Then CHIVPEAKYR(ICount%) = 2010

2100 is replaced for null data earlier in the pre-processor. In the line pasted above 2100 is replaced with 2010. I think this should also be baseyear. It doesn’t affect the model result though, as the model code would go to the deceleration branch for any peak year before the current base year.

Model code is also changed to reflect the pre-processor changes on removing the hard-coded references to years. This done in all branches of the model code including the one where the epidemic crosses the peak and moves into a control phase.

Death Rates from AIDS (AIDSDRATE)

AIDS deaths were rebounding in the early years of the model run following a historical decline in deaths (see the plot on South Africa below from the previous version of the model).  Given the poor state of data on new infection, IFs used a moving average of changing rates of prevalence to feed into death rate computation. Also, the peak year (2006), peak prevalence rate (12) and prevalence rate data for the peak year (about 6) was inconsistent in the previous version. With the South African HIV peak changed from 2006 to 2055 in the new data, the prevalence rate keeps on climbing till the new peak. For South Africa and several other countries, the extension of the peak year (as obtained from the new data) resulted in climbing AIDS deaths throughout the model horizon. The model was reconciled with historical patterns of deaths and the deaths were reduced through two code revisions. First, the base death rate is calculated from the current years’ prevalence rate (as opposed to the moving average used before) multiplied to the initial ratio between the prevalence and death rates. Second, the the impact of technical progress is amplified by doubling the value of the parameter (aidsdrtadvr). 

The next figure shows South African AIDS deaths, history and forecast (death rates do not have a history pls forecast display),, before code change.

AIDs death rate from IFs 7.26 for South Africa.

The figure below shows South African AIDS deaths, history and forecast, after code change.

AIDs death rate from IFs 7.27 B1 for South Africa.

Code Change Marker

sgh 2016/11/21 in datapop.base

sgh 2016/11/28 in populat.bas

Variables/Parameters Edited Through Code

hivincr; HIVRATE, AIDSDRATE, AIDSDTHS, aidsdrtadvr

Variables Likely to be Impacted

AIDSDTHS; DEATHS; CDR; LIFEXP; GDP

Vetting HIV/AIDS changes

Land and Irrigation

Data source for area equipped with irrigation is changed from SeriesLandIrAreaEquipFAO to SeriesLandIrAreaEquip. The new data is from AQUASTAT, as are most other irrigation and water data.

Pre-processor computation of saturation value for irrigable area is revised. There was a data table compiled offline for this variable. That table was done during PPHP IV and is old now. Steve is using irrigation potential data as the saturation value and added/revised code for estimating the saturation potential when there is no data.  

Finally model for forecasting irrigated area (LANDIRAREAEQUIP) is also revised. The previous model was basically a convergence of the area equipped to the saturation value. The model is revised to a causal model driven by precipitation and crop demand (production plus import minus export) per unit area of potentially irrigable land. The name of the analytic function is “LandEquippedPercentTotal (Log) vs CropDemandOverPotential (Log) & Precip (Log).” The causal model is added with a continuation of historical growth rate gradually phased out in 20 years. Precipitation is obtained from the environmental model.  

Code Change Marker

'sgh 2016/09/25 in infrastr.bas

'sgh 2016/07/03 in environment.bas

'sgh 2016/11/18 in datainfra.bas

Variable/Parameters Edited/Affected

LANDIRAREAEQUIP; LANDIRAREASAT

Variable/Parameters to be Impacted

WATDEMAND

Water Demand

New regression function added for estimating agricultural water demand. This is based off the area of land that is actually irrigated, rather than the land equipped for irrigation. This required that a new variable be added, "LANDIRAREAACTUAL" which is the area of land actually irrigated. A parameter (multiplier base 1) is also added on this variable, "landirareaactualm".

Variable/Parameters Edited/Affected

WATDEMAND (agriculture)

Variable/Parameters Added

LANDIRAREAACTUAL; landirareaactualm

Code Change Marker

'sgh 2016/09/29 in datawater.bas

'sgh 2016/11/17 in water,bas

Economic Growth: Adjustment for External

We might turn the  gdpadjsw to on (=1) in the base case. (Barry)

Scenario Rerun Feature Added

Scenario runs can now be stopped in the middle of the run and restarted with changed values of parameters. Here is the description of the new feature:

  • Create a scenario where I set certain parameters going out for an initial horizon, say to 2030.
  • Run the model out to that point.
  • Review the results at that point.
  • Return to the scenario development page and set the parameters for the next horizon, say from 2030 to 2050.
  • Continue running the scenario out to the next horizon.
  • Repeat steps 3-5 until the final horizon is reached

The new feature is implemented through a new menu option in the scenario tree form, called Scenario ReRun options, with 2 submenus:

 1. Avoid automatic reset of initial year to run: This is a toggle switch. When the switch is off, the default behavior, the RUN screen will be as it used to be with no option to reset initial year to base year (see the first of the two figures in this section).  When the switch is turned on (by clicking on it), the user will see a new button in the Run screen (see the second of the two figures below). With the toggle on and unless the new Run screen button is pressed, scenario runs will start from where it ended last time.   

2. Manually Reset initial year to run, if you have turned on the previous option, you might want to go back to starting the scenario run from the first year. This option allows you to do that without having to go to the Run screen and press the new button.

Scenario rerun vetting

Run Screen with Menu Option 1 turned off.
Run Screen with Menu Option 1 turned on.

Database Update

GDP2011 table is updated from IMF's WEO October growth rates. GDPGrowthRate has also been updated. The HIV peak rate and peak prevalence data has been updated. (Note from Steve: I had some issues loading this into IFsHistSeries through the "merging" interface however, I think because this is a strange series that is not actually a time series - the column headers are "Peak Prevalence" and "peak year". We've also updated central and general tax data that Mohammod found, and WHO data, neither of which are used in the preprocessor. In all, we've updated 51 series.)

ICTD tax revenue series are also in. The data still has some issues, e.g., data is in ratios to GDP instead of percentages of GDP. These will be fixed in the next version.

Provincial Model: China 

Mickey fixed the China provincial model by putting in the right province codes.

Other Changes: Displays

Mickey fixed some display lists in the International Politics category.

Dyadic trade had some display (GUI) changes.

Table Display now allows saving transpose to Windows Clipboard.

Previous Version: Version 7.26: Summary of Changes

Economic Growth: Adjustment Factor for External Growth

Gdpadjsw switch that was added in version 7.25/7.26 is now turned on (=1) in the base case of the model. This switch will be on by default in any scenario now. As a result, adjustments (read from the base run) will be made so that GDP impacts, if any, are visible in the early years of the model.

Dyadic Trade

New variables (e.g., XDDYad) were added and display features were developed.

Government Finance Model

Revenue model was updated with new regression functions for various tax categories. Government transfer pre-processor was fixed. The debt target function was revised and aid received was added to debt. The speed of revenue-expenditure equilibration was adjusted. GDS targeting as a percent of GDP was added. GDS protection parameter was made available for all GDS categories.

DiploMetrix

Errors in the revised formulations of embassy and IGO were fixed.

Interface Changes

Bug fixes on trillion dollar display in Table Display and history and forecast selection in Flex Display screen. Several flex displays definitions were updated/corrected on infrastructure, education and government finance. In the Geography menu of Flex Display, a new option now allows selecting country and groups together.

Data Update

A new government debt series (GovtDebtGen%GDP) is added. The series is not used in pre-processor. 

Provincial Model: South Africa

South Africa provincial model was rebased to 2014.