Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
MridulS committed Nov 7, 2023
1 parent 34e0dac commit 4c50449
Show file tree
Hide file tree
Showing 24 changed files with 96 additions and 261 deletions.
3 changes: 1 addition & 2 deletions examples/Calibration/Income_calibrations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
}
],
"source": [
"\n",
"age_min = 25\n",
"age_max = 91\n",
"# Cagetti has a year trend in his specification, so we have to say on what\n",
Expand All @@ -114,7 +113,7 @@
" age_max=age_max,\n",
" adjust_infl_to=adjust_infl_to,\n",
" start_year=start_year,\n",
" **spec[1]\n",
" **spec[1],\n",
" )\n",
" MeanY = find_profile(params[\"PermGroFac\"], params[\"P0\"])\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/Calibration/Life_Cycle_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
" age_max=death_age,\n",
" adjust_infl_to=adjust_infl_to,\n",
" **income_calib[education],\n",
" SabelhausSong=True\n",
" SabelhausSong=True,\n",
")\n",
"\n",
"# Initial distribution of wealth and permanent income\n",
Expand Down
1 change: 0 additions & 1 deletion examples/Calibration/SCF_distributions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
}
],
"source": [
"\n",
"# Formatting\n",
"frame = frame.melt(id_vars=[\"base_year\", \"age\", \"education\", \"wave\"])\n",
"aux = frame[\"variable\"].str.split(\"(Mean|Std)\", n=1, expand=True)\n",
Expand Down
1 change: 0 additions & 1 deletion examples/Calibration/Sabelhaus_Song_var_profiles.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
}
],
"source": [
"\n",
"# Plot transitory shock variances\n",
"plt.figure()\n",
"for i in range(len(cohorts)):\n",
Expand Down
4 changes: 0 additions & 4 deletions examples/Calibration/US_SSA_life_tables.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
}
],
"source": [
"\n",
"tables = get_ssa_life_tables()\n",
"print(tables.head)"
]
Expand All @@ -73,7 +72,6 @@
},
"outputs": [],
"source": [
"\n",
"# We will find 1-year survival probabilities from ages 21 to 100\n",
"min_age = 21\n",
"max_age = 100\n",
Expand Down Expand Up @@ -111,7 +109,6 @@
}
],
"source": [
"\n",
"# First, the \"longitudinal method\", which gives us the probabilities\n",
"# experienced by agents born in \"year\" throughout their lived\n",
"plt.figure()\n",
Expand Down Expand Up @@ -156,7 +153,6 @@
}
],
"source": [
"\n",
"# Second, the \"cross-sectional method\", which gives us the probabilities of\n",
"# survivals of individuals of differnet ages that are alive in the given year.\n",
"plt.figure()\n",
Expand Down
4 changes: 1 addition & 3 deletions examples/ConsIndShockModel/Finite Cyclical Test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"source": [
"# Initial imports and notebook setup, click arrow to show\n",
"from HARK.ConsumptionSaving.ConsIndShockModel import IndShockConsumerType\n",
"from HARK.utilities import plot_funcs_der, plot_funcs\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"from HARK.utilities import plot_funcs\n",
"\n",
"mystr = lambda number: \"{:.4f}\".format(number)"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
"\n",
"\n",
"import time\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from copy import copy, deepcopy"
"import matplotlib.pyplot as plt"
]
},
{
Expand Down Expand Up @@ -73,7 +71,6 @@
},
"outputs": [],
"source": [
"\n",
"Agent = IndShockConsumerType(**Dict)"
]
},
Expand Down Expand Up @@ -118,7 +115,6 @@
}
],
"source": [
"\n",
"start = time.time()\n",
"Agent.compute_steady_state()\n",
"print(\"Seconds to compute steady state\", time.time() - start)"
Expand Down Expand Up @@ -159,7 +155,6 @@
}
],
"source": [
"\n",
"start = time.time()\n",
"\n",
"CJAC_Perm, AJAC_Perm = Agent.calc_jacobian(\"PermShkStd\", 300)\n",
Expand Down Expand Up @@ -195,7 +190,6 @@
}
],
"source": [
"\n",
"plt.plot(CJAC_Perm.T[0])\n",
"plt.plot(CJAC_Perm.T[10])\n",
"plt.plot(CJAC_Perm.T[30])\n",
Expand Down Expand Up @@ -230,7 +224,6 @@
}
],
"source": [
"\n",
"plt.plot(AJAC_Perm.T[0])\n",
"plt.plot(AJAC_Perm.T[10])\n",
"plt.plot(AJAC_Perm.T[30])\n",
Expand Down Expand Up @@ -286,7 +279,6 @@
}
],
"source": [
"\n",
"plt.plot(CJAC_Rfree.T[0])\n",
"plt.plot(CJAC_Rfree.T[10])\n",
"plt.plot(CJAC_Rfree.T[30])\n",
Expand Down Expand Up @@ -320,7 +312,6 @@
}
],
"source": [
"\n",
"plt.plot(AJAC_Rfree.T[0])\n",
"plt.plot(AJAC_Rfree.T[10])\n",
"plt.plot(AJAC_Rfree.T[30])\n",
Expand Down
Loading

0 comments on commit 4c50449

Please sign in to comment.