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_pop=False, tax_func_path=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_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:

dictionary containing arrays of tax

function parameters

run_micro (bool): whether to estimate tax function parameters

Return type:

dict_params (dict)