Skip to content

Commit

Permalink
Merge pull request #12 from econ-ark/LifeCycleWealthInUtility
Browse files Browse the repository at this point in the history
Life cycle wealth in utility
  • Loading branch information
alanlujan91 authored Nov 27, 2023
2 parents e00310b + 1b722da commit 32d06ee
Show file tree
Hide file tree
Showing 138 changed files with 58,814 additions and 79 deletions.
Empty file added .Rhistory
Empty file.
25 changes: 13 additions & 12 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest econ-ark numpy matplotlib
- name: Test with pytest
run: |
pytest Code/tests.py
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest numpy matplotlib
pip install git+https://github.com/econ-ark/HARK@master
- name: Test with pytest
run: |
pytest Code/tests.py
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,13 @@ dmypy.json
cython_debug/

.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix
.idea/*

.ipynb_checkpoints
_build
1 change: 0 additions & 1 deletion Calibration/EstimationParameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@
)
init_consumer_objects["PermGroFacAgg"] = 1.0


if __name__ == "__main__":
print("Sorry, EstimationParameters doesn't actually do anything on its own.")
print("This module is imported by StructEstimation, providing calibrated ")
Expand Down
5 changes: 0 additions & 5 deletions Calibration/SetupSCFdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Sets up the SCF data for use in the SolvingMicroDSOPs estimation.
"""


import os

import numpy as np # Numerical Python
Expand All @@ -23,7 +22,6 @@
# Relative directory for primitive parameter files
code_dir = os.path.join(my_file_path, "../Code/")


# Need to rely on the manual insertion of pathnames to all files in do_all.py
# NOTE sys.path.insert(0, os.path.abspath(tables_dir)), etc. may need to be
# copied from do_all.py to here
Expand All @@ -37,7 +35,6 @@
# os.path.abspath('./') #'./'
scf_data_path = data_location = os.path.dirname(os.path.abspath(__file__))


data = pd.read_csv(scf_data_path + "/SCFdata.csv")

# Keep only observations with normal incomes > 0,
Expand Down Expand Up @@ -66,13 +63,11 @@
# Generate a single array of SCF data, useful for resampling for bootstrap
scf_data_array = np.array([w_to_y_data, empirical_groups, empirical_weights]).T


# Generate a mapping between the real ages in the groups and the indices of simulated data
simulation_map_cohorts_to_age_indices = []
for ages in empirical_cohort_age_groups:
simulation_map_cohorts_to_age_indices.append(np.array(ages) - initial_age)


if __name__ == "__main__":
print("Sorry, SetupSCFdata doesn't actually do anything on its own.")
print("This module is imported by StructEstimation, providing data for")
Expand Down
Loading

0 comments on commit 32d06ee

Please sign in to comment.