Main Calibration Functions#
calibrate.py classes, methods, and modules
ogusa.calibrate#
- class ogusa.calibrate.Calibration(p, estimate_tax_functions=False, estimate_beta=False, estimate_chi_n=False, estimate_lifecycle_prefs=False, estimate_pop=False, get_macro_params=False, tax_func_path=None, lifecycle_params_path=None, lifecycle_config=None, lifecycle_options=None, lifecycle_initial_ss=None, lifecycle_kwargs=None, iit_baseline=None, iit_reform={}, guid='', data='cps', gfactors=None, weights=None, records_start_year=2014, client=None, num_workers=1, demographic_data_path=None, output_path=None)[source]#
OG-USA calibration class
- get_dict()[source]#
Returns all newly calibrated parameters in a dictionary.
- Returns:
- parameter updates in update_specifications
format, including beta_annual, chi_b, and chi_n when the lifecycle preferences were calibrated
- Return type:
dict (dict)
- get_tax_function_parameters(p, iit_baseline=None, iit_reform={}, guid='', data='', gfactors=None, weights=None, records_start_year=2014, client=None, num_workers=1, run_micro=False, tax_func_path=None)[source]#
Reads pickle file of tax function parameters or estimates the parameters from microsimulation model output.
- Parameters:
p (OG-Core Parameters object) – parameters object
iit_baseline (dict) – baseline policy to use
iit_reform (dict) – reform tax parameters
guid (string) – id for tax function parameters
data (str or Pandas DataFrame) – path or DataFrame with data for Tax-Calculator model
gfactors (str or Pandas DataFrame) – path or DataFrame with growth factors for Tax-Calculator model
weights (str or Pandas DataFrame) – path or DataFrame with weights for Tax-Calculator model
records_start_year (int) – year micro data begins
client (Dask client object) – client
num_workers (int) – number of workers for Dask client
run_micro (bool) – whether to estimate parameters from microsimulation model
tax_func_path (string) – path where find or save tax function parameter estimates
- Returns:
None
- read_tax_func_estimate(p, tax_func_path)[source]#
This function reads in tax function parameters from pickle files.
- Parameters:
tax_func_path (str) – path to pickle with tax function parameter estimates
- Returns:
tax function parameters and estimation flag:
dict_params (dict): dictionary containing arrays of tax function parameters
run_micro (bool): whether to estimate tax function parameters
- Return type:
(tuple)