Add initial files from Aiden's OG-PHL-based work, renamed to OG-BRA#2
Add initial files from Aiden's OG-PHL-based work, renamed to OG-BRA#2markdebacker wants to merge 3 commits into
Conversation
|
I added @Atanceplus BRA files to this PSL repository and made sure to change all the occurrences of PHL, phl, and phillipines to BRA, bra, and Brazil. |
| - './ogbra/**.py' | ||
| jobs: | ||
| build-and-deploy: | ||
| if: github.repository == 'EAPD-DRB/OG-BRA' |
There was a problem hiding this comment.
repo should be changed to 'PSLmodels/OG-BRA'
| jobs: | ||
| deploy: | ||
| name: Publish to PyPI | ||
| if: github.repository == 'EAPD-DRB/OG-BRA' |
There was a problem hiding this comment.
Repo should be changed to 'PSLmodels/OG-BRA'
| (SecDemogFert)= | ||
| ## Fertility rates | ||
|
|
||
| Our data for Brazil fertility rates by age come from United Nations fertility rate data for a country for some range of years (at least one year) and by age. The `country_id=608` is for the Brazil. These data come from the United Nations Data Portal API for UN population data (see https://population.un.org/dataportal/about/dataapi). The UN variable code for Population by 1-year age groups and sex is "47" and that for Fertility rates by age of mother (1-year) is "68". |
There was a problem hiding this comment.
For Brazil, we should have country_id=076
| totpers=100, | ||
| min_age=0, | ||
| max_age=99, | ||
| country_id="608", |
| totpers=100, | ||
| min_age=0, | ||
| max_age=99, | ||
| country_id="608", |
| mort_rates=None, | ||
| infmort_rates=None, | ||
| pop_dist=None, | ||
| country_id="608", |
| (Chap_LfEarn)= | ||
| # Lifetime Earnings Profiles | ||
|
|
||
| Among households in `OG-BRA`, we model variations in the labor productivity over the lifecycle and between households of different skill groups. Together, these variations in productivity generate a distribution of earnings that is calibrated to match the level of inequality in the Brazil. This chapter describes the calibration of the lifecycle earnings profiles and the distribution of earnings in the model. |
There was a problem hiding this comment.
"the Brazil" should be "Brazil"
| # Exogenous Parameters | ||
|
|
||
|
|
||
| The JSON file [`ogbra_default_parameters.json`](https://github.com/EAPD-DRB/OG-BRA/blob/master/ogbra/ogbra_default_parameters.json) provides values for all the model parameters used as defaults for `OG-BRA`. Below, we provide a table highlighting some of the parameters describing the scale of the model (number of periods, aged, productivity types) and some parameters of the solution method (dampening parameter for TPI). The table below provides a list of the exogenous parameters and their baseline calibration values. |
There was a problem hiding this comment.
"https://github.com/EAPD-DRB" should become "https://github.com/PSLmodels"
|
|
||
| ## Economic Assumptions | ||
|
|
||
| As the default rate of labor augmenting technological change, $g_y$, we use a value of 3.6%. The average annual growth rate in GDP per capita in the Brazil between 2000 and 2019 is 3.6% per year. |
There was a problem hiding this comment.
"the Brazil" should be "Brazil"
| (SecUBIcalc)= | ||
| ## Calculating UBI | ||
|
|
||
| We calculate the time series of UBI household transfers in model units $ubi_{j,s,t)}$ and the time series of total UBI expenditures in model units $UBI_t$ from five parameters described in the [`ogbra_default_parameters.json`](https://github.com/EAPD-DRB/OG-BRA/blob/master/ogbra/ogbra_default_parameters.json) file (`ubi_growthadj`, `ubi_nom_017`, `ubi_nom_1864`, `ubi_nom_65p`, and `ubi_nom_max`) interfaced with the `OG-BRA` demographic dynamics over lifetime income groups $j$ and ages $s$, and multiplied by household composition matrices from the `Calibrate` class of the `OG-BRA/ogbra/calibrate.py` module in the repository. |
There was a problem hiding this comment.
Change the GH org from EAPD-DRB to PSLmodels throughout this file.
| ``` | ||
|
|
||
| If you have made it this far, you've successfully made a remote copy (a | ||
| fork) of the central `OG-BRA` repo. That remote repo is hosted on GitHub.com at [https://github.com/EAPD-DRB/OG-BRA](https://github.com/EAPD-DRB/OG-BRA). You have also created a local repo (a [clone](https://help.github.com/articles/github-glossary/#clone)) that lives on your machine and only you can see; you will make your changes to |
There was a problem hiding this comment.
Change GH org from EAPD-DRB to PSLmodels throughout
| | Package | [](https://www.python.org/downloads/release/python-31013/) [](https://www.python.org/downloads/release/python-3116/) [](https://pypi.org/project/ogbra/) [](https://pypi.org/project/ogbra/) | | ||
| | Testing |    [](https://codecov.io/gh/EAPD-DRB/OG-BRA) | | ||
|
|
||
| [`OG-BRA`](https://github.com/EAPD-DRB/OG-BRA) is a Python package that provides code and data to calibrate an overlapping-generations (OG) model to the economy of the Brazil (BRA), the code of which is hosted on GitHub at https://github.com/EAPD-DRB/OG-BRA. `OG-BRA` uses as a dependency the [`OG-Core`](https://pslmodels.github.io/OG-Core/) package, which contains the core theory and logic of a general OG model. The `OG-BRA` calibration package and the `OG-Core` theory and logic make the model that allows for dynamic general equilibrium analysis of federal fiscal policy in the Republic of the Brazil. The model output focuses on changes in macroeconomic aggregates (GDP, investment, consumption), wages, interest rates, and the stream of tax revenues over time. This documentation of the `OG-BRA` package contains the following major sections, which are regularly updated. |
There was a problem hiding this comment.
Two instances of "the Brazil" to be changed to "Brazil"
| (Sec_Disclaimer)= | ||
| ## Disclaimer | ||
|
|
||
| The model is continuously under development. Users will be notified through [closed PR threads](https://github.com/EAPD-DRB/OG-BRA/pulls?q=is%3Apr+is%3Aclosed) and through the [release notes](https://github.com/EAPD-DRB/OG-BRA/releases) what changes have been implemented. The package will have released versions, which will be checked against existing code prior to release. Stay tuned for an upcoming release! |
| (Sec_CitingOGBRA)= | ||
| ## Citing OG-BRA | ||
|
|
||
| `OG-BRA` (Version #.#.#)[Source code], https://github.com/EAPD-DRB/OG-BRA |
There was a problem hiding this comment.
Let's delete everything from the UNtutorial chapter and reference to it in other places such at toc.yml
There was a problem hiding this comment.
Change file name to OGBRA_references.md
| # Book settings | ||
| title : OG-BRA | ||
| author : Marcelo LaFleur, Richard W. Evans, and Jason DeBacker | ||
| copyright : '2024' |
| #################################################### | ||
| # Information about where the book exists on the web | ||
| repository: | ||
| url: https://github.com/EAPD-DRB/OG-BRA |
| - file: content/calibration/UBI | ||
| - file: content/calibration/matching_lwi | ||
| - file: content/calibration/exogenous_parameters | ||
| - caption: UN Tutorial |
There was a problem hiding this comment.
Change file name to OGBRA_references.bib
|
|
||
|
|
||
| CUR_DIR = os.path.dirname(os.path.realpath(__file__)) | ||
| UN_COUNTRY_CODE = "608" |
There was a problem hiding this comment.
Country code should be changed to "076"
There was a problem hiding this comment.
Let's just rename this to OG-BRA_logo.png, but open an issue to update the logo files.
There was a problem hiding this comment.
Let's just rename this to OG-BRA_logo_gitfig.png, but open an issue to update the logo files.
There was a problem hiding this comment.
Same as above -- just rename and issue will mention updating this logo.
| } | ||
|
|
||
| CBO_UNITS = { | ||
| "Y": r"Billions of ₱", |
There was a problem hiding this comment.
Can change from the Philippine peso to the Brazilian real. Replace "₱" with R$".
There was a problem hiding this comment.
Let's replace PHL with BRA in file name, but open issue to note SAM file needs updating. Possible source: https://www.ifpri.org/country/brazil/#country-datasets
| @@ -0,0 +1,2 @@ | |||
| include ogbra/ogbra_default_parameters.json | |||
| include ogbra/data/002_IFPRI_SAM_IDN_2018_SAM.csv | |||
There was a problem hiding this comment.
Replace name of csv file with the name of the SAM file above (referenced in input_output.py).
| long_description_content_type="text/markdown", | ||
| long_description=longdesc, | ||
| keywords="BRA Brazil calibration of large scale overlapping generations model of fiscal policy", | ||
| url="https://github.com/EAPD-DRB/OG-BRA/", |
There was a problem hiding this comment.
Change EAPD-DRB to PSLmodels throughout this file.
jdebacker
left a comment
There was a problem hiding this comment.
@markdebacker I've reviewed this and left comments for the changes I'd like to see before this PR is ready to merge.
We'll note that there is still more substantive work to do after this PR, but addressing the comments will help lay a good foundation for that later work.
No description provided.