{"action":"opened","issue":{"url":"https://api.github.com/repos/WHOequity/who-heat/issues/139","labels_url":"https://api.github.com/repos/WHOequity/who-heat/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/WHOequity/who-heat/issues/139/comments","events_url":"https://api.github.com/repos/WHOequity/who-heat/issues/139/events","html_url":"https://github.com/WHOequity/who-heat/issues/139","id":112052939,"number":139,"title":"Bug: negative numbers in bootstrap","user":{"login":"zross","id":1395177,"avatar_url":"https://avatars.githubusercontent.com/u/1395177?v=3","gravatar_id":"","url":"https://api.github.com/users/zross","html_url":"https://github.com/zross","followers_url":"https://api.github.com/users/zross/followers","following_url":"https://api.github.com/users/zross/following{/other_user}","gists_url":"https://api.github.com/users/zross/gists{/gist_id}","starred_url":"https://api.github.com/users/zross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zross/subscriptions","organizations_url":"https://api.github.com/users/zross/orgs","repos_url":"https://api.github.com/users/zross/repos","events_url":"https://api.github.com/users/zross/events{/privacy}","received_events_url":"https://api.github.com/users/zross/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-19T00:27:04Z","updated_at":"2015-10-19T00:27:04Z","closed_at":null,"body":"@WHOequity as part of the bootstrap random normal data with a mean and SE similar to the input data are generated. The random normal data generation can generate negative numbers. This may or may not be an issue with most of the inequality measures but it is definitely an issue with the Theil Index because, as part of the calculation, we take a log of the values divided by the weighted mean. The log of the negative values, of course, generates an NA.\r\n\r\nHow do you want this handled? I could take an absolute value of the random normal data in which case it would be cheating a little but would probably be fine. Or perhaps you have another idea.\r\n\r\nThe negative numbers would be expected to be small -- here is the example data that caused the error:\r\n\r\n```\r\n[1] -0.4523927 15.1386028  1.8834095 28.9088388 27.5972510 21.4177190 11.5814215 67.0462422\r\n [9] 27.2054385 48.0139706 45.9009950 10.1313739 14.0712461 45.6017571 72.8529677\r\n```\r\n\r\nAnd do you know if the negative numbers would affect the other calculations? The only other one that had a log is `mld` but it looks like the boot se is disabled for this measure -- based on the notes it looks disabled for this exact reason.\r\n\r\n\r\n\r\n"}}