{"action":"created","issue":{"url":"https://api.github.com/repos/open-source-economics/PFLCM/issues/11","repository_url":"https://api.github.com/repos/open-source-economics/PFLCM","labels_url":"https://api.github.com/repos/open-source-economics/PFLCM/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/open-source-economics/PFLCM/issues/11/comments","events_url":"https://api.github.com/repos/open-source-economics/PFLCM/issues/11/events","html_url":"https://github.com/open-source-economics/PFLCM/issues/11","id":362700840,"node_id":"MDU6SXNzdWUzNjI3MDA4NDA=","number":11,"title":"Dealing with inappropriate parameter input values","user":{"login":"codykallen","id":20171679,"node_id":"MDQ6VXNlcjIwMTcxNjc5","avatar_url":"https://avatars1.githubusercontent.com/u/20171679?v=4","gravatar_id":"","url":"https://api.github.com/users/codykallen","html_url":"https://github.com/codykallen","followers_url":"https://api.github.com/users/codykallen/followers","following_url":"https://api.github.com/users/codykallen/following{/other_user}","gists_url":"https://api.github.com/users/codykallen/gists{/gist_id}","starred_url":"https://api.github.com/users/codykallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codykallen/subscriptions","organizations_url":"https://api.github.com/users/codykallen/orgs","repos_url":"https://api.github.com/users/codykallen/repos","events_url":"https://api.github.com/users/codykallen/events{/privacy}","received_events_url":"https://api.github.com/users/codykallen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-21T17:00:40Z","updated_at":"2018-09-22T16:11:15Z","closed_at":null,"author_association":"COLLABORATOR","body":"As should be obvious, the various policy parameters and take-up assumptions should have limitations on the values they can take. For example, the `include_*` parameters should only be able to take values of 0 or 1, and the maximum duration should not be set to zero or negative values. \r\n\r\nThese restrictions/limitations generally take two forms: \r\n1) values that break the code\r\n - Ex: setting `maxduration_days = -10` would cause the code to fail, as no unit can take negative durations\r\n - Ex: setting `waiting_period = 500` causes the code to fail, as no unit can take annual leave exceeding some a year\r\n\r\n2) values that don't break the code but cause incorrect results\r\n - Ex: setting `maxduration_days = 500` would not break the code, but the limit would be nonbinding for all units and beyond modeling capabilities\r\n - Ex: setting `waiting_period = 30` would not break the code, but the modeling for the \"reduced employer push\" would not apply correctly\r\n - Ex: setting `include_military = 0.5` would not break the code, but the parameter is only intended to modeling the inclusion or exclusion of this type of leave, so intermediate values don't make sense\r\n\r\nI am planning to add some modifications to the beginning of the `run_allassumptions.do` file to ensure that inappropriate values are not passed. I will certainly add assert statements that stop the program if code-breaking values are passed, but there is an open question on how to deal with inappropriate parameter values. I am inclined to simply use a warning that the value exceeds the recommended bounds. \r\n\r\n@begitis @MattHJensen "},"comment":{"url":"https://api.github.com/repos/open-source-economics/PFLCM/issues/comments/423754782","html_url":"https://github.com/open-source-economics/PFLCM/issues/11#issuecomment-423754782","issue_url":"https://api.github.com/repos/open-source-economics/PFLCM/issues/11","id":423754782,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzc1NDc4Mg==","user":{"login":"codykallen","id":20171679,"node_id":"MDQ6VXNlcjIwMTcxNjc5","avatar_url":"https://avatars1.githubusercontent.com/u/20171679?v=4","gravatar_id":"","url":"https://api.github.com/users/codykallen","html_url":"https://github.com/codykallen","followers_url":"https://api.github.com/users/codykallen/followers","following_url":"https://api.github.com/users/codykallen/following{/other_user}","gists_url":"https://api.github.com/users/codykallen/gists{/gist_id}","starred_url":"https://api.github.com/users/codykallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codykallen/subscriptions","organizations_url":"https://api.github.com/users/codykallen/orgs","repos_url":"https://api.github.com/users/codykallen/repos","events_url":"https://api.github.com/users/codykallen/events{/privacy}","received_events_url":"https://api.github.com/users/codykallen/received_events","type":"User","site_admin":false},"created_at":"2018-09-22T16:11:15Z","updated_at":"2018-09-22T16:11:15Z","author_association":"COLLABORATOR","body":"In the previous comment, I made a suggestion regarding providing zeros if there are no observations in the FMLA data meeting the conditions. The code to implement this would be:\r\n\r\n```\r\ncount if CONDITIONS\r\nif r(N)>0 {\r\ncollapse VAROFINTEREST if CONDITIONS\r\nrename VAROFINTEREST VAROFINTEREST2\r\n}\r\nelse {\r\ngen VAROFINTEREST2 = 0\r\ncollapse VAROFINTEREST2\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"codykallen"}}