PSLmodels / OG-UK

An overlapping generations model to simulate fiscal policy the United Kingdom.
https://pslmodels.github.io/OG-UK
Other
6 stars 7 forks source link

Fix microsimulation bugs #25

Closed nikhilwoodruff closed 3 years ago

nikhilwoodruff commented 3 years ago

@jdebacker @jpycroft @rickecon @MaxGhenis

Just noticed a few things that could be changed on the openfisca-uk side:

codecov[bot] commented 3 years ago

Codecov Report

Merging #25 (8e3f40f) into main (914be4d) will decrease coverage by 6.58%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
- Coverage   58.74%   52.15%   -6.59%     
==========================================
  Files           6        6              
  Lines         766      765       -1     
==========================================
- Hits          450      399      -51     
- Misses        316      366      +50     
Flag Coverage Δ
unittests 52.15% <100.00%> (-6.59%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
og_uk_calibrate/get_micro_data.py 60.46% <100.00%> (-0.90%) :arrow_down:
og_uk_calibrate/txfunc.py 42.64% <0.00%> (-10.51%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 914be4d...8e3f40f. Read the comment docs.

jdebacker commented 3 years ago

@nikhilwoodruff asks:

We can calculate the MTR for capital income - @jdebacker I've done this by technically calculating the MTR for savings income, but dividends are taxed differently in the UK so I imagine there's a correct way to do this?

I'd like to follow the method we use in the Tax-Calculator and OG-USA linkage. That is, the microsimulation calculator computes MTRs on various sources of income. Any averaging across sources is done in the OG model (since it's a limitation of the OG model that all of these sources are not available). Would that work for you?

Your other comments sounds accurate to me.