policy_modules

Submodules

policy_modules.age_rating

class policy_modules.age_rating.Exchange(gid)[source]

Bases: object

inflate(premium, pop_df, expnd_choices, type, choice_types)[source]

policy_modules.calculate_regression

class policy_modules.calculate_regression.FplRegression(policy_dict)[source]

Bases: object

calculate_regression_line(x, y, output)[source]

policy_modules.cost_sharing_subsidy

class policy_modules.cost_sharing_subsidy.CostSharing(policy_params=None)[source]

Bases: object

oop_update(choice_table, pop_df)[source]

updates OOP for those on a silver plan with cost sharing subsidy values assuming that pop_df has subsidy_elig column already

set_year(curr_year)[source]

return slice of pertinant year allows this to be reset at begining of each simulation year

policy_modules.employer_penalty

class policy_modules.employer_penalty.EmployerPenalty(policy_dict)[source]

Bases: object

penalty(esi_offer, workers_on_xc=0, fplty_mult=1)[source]
set_firm(firm_id, worker_table)[source]
set_year(curr_year)[source]

return slice of pertinant year allows this to be reset at begining of each simulation year

policy_modules.exchange

class policy_modules.exchange.Exchange(policy_dict=None)[source]

Bases: object

affordability(pop_df, wrk_df, Curr_esi, affordability_type)[source]
based on affordability definition

affordability_type = 0 –> single affordability_type = 1 –> family affordability_type = 2 –> hybrid

input:

df of population; must include person_id wrk_df; must include person_id, part_time status, and firm_id Curr_esi; must part_time; av_value self.esi_thresh is the threshold for affordability (0.0956)

output:

8 by n matrix; at least 1 adult (not adult kid) or that individual has affordable esi

dynamic_exchange_update(xc_prem, iter)[source]

first updates the statewide premiums and then uses the updated statewide premiums in order to calculate the regional premiums using the multiplier iter: indicates which xc iteration the dynamic exchange is running on

esi_afford_family(pop_df, wrk_df, Curr_esi)[source]
esi_afford_hybrid(pop_df, wrk_df, Curr_esi)[source]
esi_afford_single(pop_df, wrk_df, Curr_esi)[source]
input:

pop_df: wrk_df: person_id, part_time status, and firm_id Curr_esi: must have part_time; av_value self.esi_thresh is the threshold for affordability (0.0956)

output:

pop_df with one extra column: if a person has affordable esi coverage

programmer:

xiao chen, March 19, 2017

get_reg_prem()[source]
get_state_prem_ratio()[source]
proxy_premium(choices)[source]

appending 8 extra columns to choioce table for AV value adjusted exchange preimum (subsidized) the 8 columns are not choice specific, since it will be used only for calculating esi premiums

set_year(curr_year, subsidy_to_undoc, afford_table, func_params={'av_threshold': 0.6, 'pmc_flag': None, 'xc_inflator': None}, region_parameters=None)[source]

return slice of pertinent year allows this to be reset at begining of each simulation year

subsidy_elig(pop_df, wrk_df, Curr_esi, affordability_type)[source]
xc_premium_amount(pop_df, wrk_df, xc_prem, Curr_esi, choices, affordability_type, curr_av_value)[source]

returns choice table with extra columns for exchange premiums based on the choices

policy_modules.excise_tax

class policy_modules.excise_tax.ExciseTax(policy_params)[source]

Bases: object

get_excise_av_threshold(worker_table)[source]
get_rate_by_age(age)[source]
premium_change(firm_id, worker_table, prem_df)[source]
set_year(curr_year)[source]

policy_modules.fam_tax

class policy_modules.fam_tax.FedTax(tax_rates=None, tax_deductions=None)[source]

Bases: policy_modules.fam_tax.Tax

Borg singleton config object for FedTax

class policy_modules.fam_tax.StateTax(tax_rates=None, tax_deductions=None)[source]

Bases: policy_modules.fam_tax.Tax

Borg singleton config object for StateTax

class policy_modules.fam_tax.Tax(tax_rates=None, tax_deductions=None)[source]

Bases: object

base_deduction(filing_status)[source]
cal_tax_row(income, txfstat, famMemLst)[source]
calculate_marginal_rate(family)[source]
calculate_tax_amount(family)[source]
calculate_tax_h(year, txfstat, incomeArr)[source]
calculate_tax_h_df(year, incomeArr, df, esi_drop, df_esi)[source]
calculate_tax_h_df_iter(year, incomeArr, df, esi_drop, df_esi)[source]
dependent_deduction(dependents)[source]
determine_marginal_limit(agi, tax_limits)[source]
determine_tax_rate(income, family)[source]
determine_total_taxes(income, family)[source]
planIsInFirm(plan_id, firm_id, df_esi)[source]
prem_pretax_sum(famMemLst, esi_drop, df_esi)[source]
set_year(year)[source]
total_deductions(family)[source]

policy_modules.firm_tax

class policy_modules.firm_tax.FirmTax(policy_dict=None)[source]

Bases: object

total_tax(firm_id, Firm, Worker)[source]
input:

firm_id, Firm table (assumes Worker linkage)

effect:

none

output:

total tax burden not including excise taxes for ESI

policy_modules.fpl

class policy_modules.fpl.Fpl(policy_params=None, sys_params=None)[source]

Bases: object

calculate_fpl(df)[source]

calculate fpl based off of income note: data specified from set_year method

curr_data pd.DataFrame of current year fpl data income: pd.series of income family_size: pd.series of family_size

calculate_income(fpl, family_size, df)[source]

calculate income based off of fpl note: data specified from set_year method

curr_data pd.DataFrame of current year fpl data fpl: pd.series of fpl family_size: pd.series of family_size

calculate_ind_fpl(df)[source]

calculate individual_fpl based on individual_Income note: data specified from set_year method

curr_data pd.DataFrame of current year fpl data ind_income: pd.series of ind_income family_size: always 1

set_year(curr_year)[source]

return slice of pertinant year allows this to be reset at begining of each simulation year

policy_modules.mcaid_elig

class policy_modules.mcaid_elig.McaidEligibility(policy_dict=None, sys_params=None)[source]

Bases: object

calculate_premium(df, shadow_premium)[source]

assuming df has mcaid_elig variable # pseudo-code: if xc_sub then msp = a0 else

if newly_elig then msp = a1 else if prev_elig then msp = a2 else if predicted elig then msp = a3

determine_elig(df)[source]

input : a form of hieu_table, with fpl variable available output: the data frame of the same hieu_table with mcaid_elig column

and medicaid premium as well

# adjusted_prev_elig = previously elig, without ACA, from input data # predicted_elig = predicted probability, from input data # mcaid_elig = everyone who eligible post-ACA without prediction model # newly_elig = with ACA, calculated

pass_threshold(threshold, prob)[source]

checks if the probability passed in exceeds the threshold level specified in the configuration file

produce_elig_exante(df)[source]

create column of previously medicaid eligible based on 2013 medicaid eligibility requirements

set_year(curr_year)[source]

return slice of pertinant year allows this to be reset at begining of each simulation year

policy_modules.min_wage

class policy_modules.min_wage.MinWage(policy_dict, min_year, base_year)[source]

Bases: object

min_wage(Worker, Family, Hieu)[source]
minwage_threshold(Worker)[source]

hard-coded firm size

set_year(year)[source]

policy_modules.premium_calculate

class policy_modules.premium_calculate.CalculatePremium(policy_params, year)[source]

Bases: object

calculate_premium(fpl, pop_df)[source]
calculate_premium_h(fpl_base, incomeArr)[source]
calculate_premium_h_df(incomeArr, df, esi_drop)[source]
get_beta_0()[source]
get_beta_1()[source]
get_fpl_bracket()[source]
get_year()[source]
prem_cap_sum(famMemLst, esi_drop)[source]

policy_modules.premium_parameters

class policy_modules.premium_parameters.PremiumParams(policy_dict)[source]

Bases: object

admin_load(f_size)[source]
prem_ratio(premiums)[source]
reference_prem(premium)[source]

policy_modules.uninsured_penalty

class policy_modules.uninsured_penalty.UninsuredPenalty(policy_dict=None)[source]

Bases: object

cheapest_coverage(exp_choices, pop_df)[source]
input: choice table with esi premium and exchange premium calculated

pop_df with fam_income

return: hieu_level information on if a family has affordable plan the function determines based on list of criteria those exempt from paying penalty self.pnlt_unin_fam_use.max_pp is the lowest cost bronze plan

penalty(pop_df, exp_choices, individual_mandate, flat_penalties, multiplier)[source]

Assuming that pop_df has the column for exemption, once the cheapest_coverage is called exemption is an indiviudal level variable Also assume that exp_choices has fam_income at this point as well

set_year(curr_year)[source]

return slice of pertinent year allows this to be reset at begining of each simulation year

Module contents