{"action":"created","issue":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/396","labels_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/396/labels{/name}","comments_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/396/comments","events_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/396/events","html_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/396","id":111682945,"number":396,"title":"Initial fix of Calculator class mtr method","user":{"login":"martinholmer","id":12170745,"avatar_url":"https://avatars.githubusercontent.com/u/12170745?v=3","gravatar_id":"","url":"https://api.github.com/users/martinholmer","html_url":"https://github.com/martinholmer","followers_url":"https://api.github.com/users/martinholmer/followers","following_url":"https://api.github.com/users/martinholmer/following{/other_user}","gists_url":"https://api.github.com/users/martinholmer/gists{/gist_id}","starred_url":"https://api.github.com/users/martinholmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinholmer/subscriptions","organizations_url":"https://api.github.com/users/martinholmer/orgs","repos_url":"https://api.github.com/users/martinholmer/repos","events_url":"https://api.github.com/users/martinholmer/events{/privacy}","received_events_url":"https://api.github.com/users/martinholmer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-15T18:50:50Z","updated_at":"2015-10-15T18:59:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls/396","html_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/396","diff_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/396.diff","patch_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/396.patch"},"body":"This pull request fixes the mtr method to work with the new FICA tax calculation logic introduced in pull request #379.  It does that by restricting the mtr income_type_string to being only one value, 'e00200p' (taxpayer earnings).  Future development will expand the number of valid income types.  Given this income type restriction, a number of mtr calls (including two in the behavior function) had to be changed from mtr('e00200') to mtr('e00200p') in order to get all the unit tests to pass.\r\n\r\nThe revisions to the mtr method also include the addition of a new parameter called wrt_expanded_income, which has a default value of True.  When it is True, the marginal tax rates are computed with respect to (wrt) an expanded income concept that includes the employer share of OASDI+HI payroll taxes.\r\n\r\nThe only mtr call that uses wrt_expanded_income=False is in SimpleTaxIO and that is done to facilitate comparison of marginal tax rates with Internet TAXSIM, the current version of which is not yet computing marginal tax rates with respect to expanded income.  When used in this way, the OSPC vs TAXSIM comparisons for a random sample of 100,000 tax filing units with no itemized-deduction expenses and no child-care expenses in 2013 are as follows:\r\n```\r\nTAXDIFF:ovar,#diffs,#1cdiffs,maxdiff[id]=  7     58     32    -15.00 [305]\r\nTAXDIFF:ovar,#diffs,#1cdiffs,maxdiff[id]=  9     13      0      0.90 [2158]\r\nTAXDIFF:ovar,#diffs,#1cdiffs,maxdiff[id]= 19    209    209     -0.01 [36]\r\nTAXDIFF:ovar,#diffs,#1cdiffs,maxdiff[id]= 25    115    115      0.01 [2574]\r\nTAXDIFF:ovar,#diffs,#1cdiffs,maxdiff[id]= 26      2      0  -2900.00 [95197]\r\nTAXDIFF:ovar,#diffs,#1cdiffs,maxdiff[id]= 27    150    150     -0.01 [1761]\r\nTAXDIFF:ovar,#diffs,#1cdiffs,maxdiff[id]= 28    132    132     -0.01 [36]\r\nTAXDIFF:ovar,#diffs,#1cdiffs,maxdiff[id]=  4    328    328     -0.01 [2339]\r\n```\r\nThese results show that the income tax liability (ovar=4) differences are no more than one cent, but there are a few marginal tax rate differences among the 100,000 filing units: 26 income tax rate differences greater than one basis point and 13 FICA tax rate differences greater than one basis point.  These mtr differences will be investigated in the future."},"comment":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/comments/148488766","html_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/396#issuecomment-148488766","issue_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/396","id":148488766,"user":{"login":"martinholmer","id":12170745,"avatar_url":"https://avatars.githubusercontent.com/u/12170745?v=3","gravatar_id":"","url":"https://api.github.com/users/martinholmer","html_url":"https://github.com/martinholmer","followers_url":"https://api.github.com/users/martinholmer/followers","following_url":"https://api.github.com/users/martinholmer/following{/other_user}","gists_url":"https://api.github.com/users/martinholmer/gists{/gist_id}","starred_url":"https://api.github.com/users/martinholmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinholmer/subscriptions","organizations_url":"https://api.github.com/users/martinholmer/orgs","repos_url":"https://api.github.com/users/martinholmer/repos","events_url":"https://api.github.com/users/martinholmer/events{/privacy}","received_events_url":"https://api.github.com/users/martinholmer/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T18:59:26Z","updated_at":"2015-10-15T18:59:26Z","body":"@MattHJensen,  Here are the changes to get the mtr method working reasonably well for the 'e00200p' income type.  We can add other income types in the future."}}