{"action":"created","issue":{"url":"https://api.github.com/repos/open-source-economics/Tax-Calculator/issues/750","repository_url":"https://api.github.com/repos/open-source-economics/Tax-Calculator","labels_url":"https://api.github.com/repos/open-source-economics/Tax-Calculator/issues/750/labels{/name}","comments_url":"https://api.github.com/repos/open-source-economics/Tax-Calculator/issues/750/comments","events_url":"https://api.github.com/repos/open-source-economics/Tax-Calculator/issues/750/events","html_url":"https://github.com/open-source-economics/Tax-Calculator/issues/750","id":155319457,"number":750,"title":"Move Earning Split Calculation out of Imputation?","user":{"login":"GoFroggyRun","id":13324931,"avatar_url":"https://avatars.githubusercontent.com/u/13324931?v=3","gravatar_id":"","url":"https://api.github.com/users/GoFroggyRun","html_url":"https://github.com/GoFroggyRun","followers_url":"https://api.github.com/users/GoFroggyRun/followers","following_url":"https://api.github.com/users/GoFroggyRun/following{/other_user}","gists_url":"https://api.github.com/users/GoFroggyRun/gists{/gist_id}","starred_url":"https://api.github.com/users/GoFroggyRun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoFroggyRun/subscriptions","organizations_url":"https://api.github.com/users/GoFroggyRun/orgs","repos_url":"https://api.github.com/users/GoFroggyRun/repos","events_url":"https://api.github.com/users/GoFroggyRun/events{/privacy}","received_events_url":"https://api.github.com/users/GoFroggyRun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-17T17:43:37Z","updated_at":"2016-05-18T01:13:27Z","closed_at":null,"body":"The `_impute_variables` function in `recorsd.py` includes not only the imputation of `_cmbtp_itemizer` and `_cmbtp_standard`, but also a few earning-splits that are extensively used in the `functions.py`. \r\n\r\nIf we were, however, to switch off the imputation by using `consider_imputations=False`, the earning-split parts will be skipped as well, since they are inside the `_impute_variables` function. But this is not what we want, as skipping the earning split process will lead to malfunction of the calculator: \r\nIf the process were being skipped, all earning split variables like `e00200p`, `e00200s`, `e00900p` will be zero. And functions like `EI_FICA` and `F2441` won't work in the desired way. \r\n\r\nI'd thus suggest move the earning split calculation out of the `_impute_variables` function."},"comment":{"url":"https://api.github.com/repos/open-source-economics/Tax-Calculator/issues/comments/219899451","html_url":"https://github.com/open-source-economics/Tax-Calculator/issues/750#issuecomment-219899451","issue_url":"https://api.github.com/repos/open-source-economics/Tax-Calculator/issues/750","id":219899451,"user":{"login":"feenberg","id":8114261,"avatar_url":"https://avatars.githubusercontent.com/u/8114261?v=3","gravatar_id":"","url":"https://api.github.com/users/feenberg","html_url":"https://github.com/feenberg","followers_url":"https://api.github.com/users/feenberg/followers","following_url":"https://api.github.com/users/feenberg/following{/other_user}","gists_url":"https://api.github.com/users/feenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/feenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feenberg/subscriptions","organizations_url":"https://api.github.com/users/feenberg/orgs","repos_url":"https://api.github.com/users/feenberg/repos","events_url":"https://api.github.com/users/feenberg/events{/privacy}","received_events_url":"https://api.github.com/users/feenberg/received_events","type":"User","site_admin":false},"created_at":"2016-05-18T01:13:27Z","updated_at":"2016-05-18T01:13:27Z","body":"\n\nOn Tue, 17 May 2016, Sean.Wang wrote:\n\n> \n> The _impute_variables function in recorsd.py includes not only the imputation of\n> _cmbtp_itemizer and _cmbtp_standard, but also a few earning-splits that are\n> extensively used in the functions.py.\n> \n> If we were, however, to switch off the imputation by using consider_imputations=False,\n> the earning-split parts will be skipped as well, since they are inside the\n> _impute_variables function. But this is not what we want, as skipping the earning\n> split process will lead to malfunction of the calculator:\n> If the process were being skipped, all earning split variables like e00200p, e00200s,\n> e00900p will be zero. And functions like EI_FICA and F2441 won't work in the desired\n> way.\n> \n> I'd thus suggest move the earning split calculation out of the _impute_variables\n> function.\n> \nRemember that the imputation of earning split must be done on the raw \ndata, not after any aging or growth parameters are applied. That is why I \ndid it with the other imputations in the SAS program. Also, we may be \ngetting a better earnsplit variable after 2010.\n\ndan\n\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly or view it on\n> GitHub[AHvQVYYGy25yyrgSvO39OMVbfnmTEyzoks5qCf5KgaJpZM4Ighov.gif]\n> \n> \n>"}}