Skip to content

Commit

Permalink
update with optins to not plot
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed May 2, 2024
1 parent 0025e6f commit 2d82183
Showing 1 changed file with 30 additions and 24 deletions.
54 changes: 30 additions & 24 deletions ogzaf/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def __init__(
estimate_tax_functions=False,
estimate_beta=False,
estimate_chi_n=False,
estimate_pop=False,
tax_func_path=None,
iit_reform={},
guid="",
Expand All @@ -26,6 +27,7 @@ def __init__(
self.estimate_tax_functions = estimate_tax_functions
self.estimate_beta = estimate_beta
self.estimate_chi_n = estimate_chi_n
self.estimate_pop = estimate_pop
if estimate_tax_functions:
self.tax_function_params = self.get_tax_function_parameters(
p,
Expand All @@ -43,7 +45,7 @@ def __init__(
# chi_n = self.get_chi_n()

# Macro estimation
self.macro_params = macro_params.get_macro_params()
# self.macro_params = macro_params.get_macro_params()

# io matrix and alpha_c
if p.I > 1: # no need if just one consumption good
Expand All @@ -68,27 +70,30 @@ def __init__(
# self.zeta = bequest_transmission.get_bequest_matrix()

# demographics
self.demographic_params = demographics.get_pop_objs(
p.E,
p.S,
p.T,
0,
99,
country_id="710", # UN code for ZAF
initial_data_year=p.start_year - 1,
final_data_year=p.start_year,
)
# demographics for 80 period lives (needed for getting e below)
demog80 = demographics.get_pop_objs(
20,
80,
p.T,
0,
99,
country_id="710", # UN code for ZAF
initial_data_year=p.start_year - 1,
final_data_year=p.start_year,
)
if estimate_pop:
self.demographic_params = demographics.get_pop_objs(
p.E,
p.S,
p.T,
0,
99,
country_id="710", # UN code for ZAF
initial_data_year=p.start_year - 1,
final_data_year=p.start_year,
GraphDiag=False,
)
# demographics for 80 period lives (needed for getting e below)
demog80 = demographics.get_pop_objs(
20,
80,
p.T,
0,
99,
country_id="710", # UN code for ZAF
initial_data_year=p.start_year - 1,
final_data_year=p.start_year,
GraphDiag=False,
)

# earnings profiles
self.e = income.get_e_interp(
Expand Down Expand Up @@ -401,10 +406,11 @@ def get_dict(self):
# dict["chi_n"] = self.chi_n
# dict["eta"] = self.eta
# dict["zeta"] = self.zeta
dict.update(self.macro_params)
# dict.update(self.macro_params)
dict["e"] = self.e
dict["alpha_c"] = self.alpha_c
dict["io_matrix"] = self.io_matrix
dict.update(self.demographic_params)
if self.estimate_pop:
dict.update(self.demographic_params)

return dict

0 comments on commit 2d82183

Please sign in to comment.