{"action":"created","issue":{"url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/issues/72","labels_url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/issues/72/comments","events_url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/issues/72/events","html_url":"https://github.com/HenrikBengtsson/matrixStats/issues/72","id":110420794,"number":72,"title":"weightedVar","user":{"login":"Radibor","id":7673882,"avatar_url":"https://avatars.githubusercontent.com/u/7673882?v=3","gravatar_id":"","url":"https://api.github.com/users/Radibor","html_url":"https://github.com/Radibor","followers_url":"https://api.github.com/users/Radibor/followers","following_url":"https://api.github.com/users/Radibor/following{/other_user}","gists_url":"https://api.github.com/users/Radibor/gists{/gist_id}","starred_url":"https://api.github.com/users/Radibor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Radibor/subscriptions","organizations_url":"https://api.github.com/users/Radibor/orgs","repos_url":"https://api.github.com/users/Radibor/repos","events_url":"https://api.github.com/users/Radibor/events{/privacy}","received_events_url":"https://api.github.com/users/Radibor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/labels/ASAP","name":"ASAP","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/milestones/4","html_url":"https://github.com/HenrikBengtsson/matrixStats/milestones/0.15.0","labels_url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/milestones/4/labels","id":979160,"number":4,"title":"0.15.0","description":"This will be the last consistency/bug fix release to CRAN prior to release the version supporting subsetted calculations.","creator":{"login":"HenrikBengtsson","id":1616850,"avatar_url":"https://avatars.githubusercontent.com/u/1616850?v=3","gravatar_id":"","url":"https://api.github.com/users/HenrikBengtsson","html_url":"https://github.com/HenrikBengtsson","followers_url":"https://api.github.com/users/HenrikBengtsson/followers","following_url":"https://api.github.com/users/HenrikBengtsson/following{/other_user}","gists_url":"https://api.github.com/users/HenrikBengtsson/gists{/gist_id}","starred_url":"https://api.github.com/users/HenrikBengtsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HenrikBengtsson/subscriptions","organizations_url":"https://api.github.com/users/HenrikBengtsson/orgs","repos_url":"https://api.github.com/users/HenrikBengtsson/repos","events_url":"https://api.github.com/users/HenrikBengtsson/events{/privacy}","received_events_url":"https://api.github.com/users/HenrikBengtsson/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":6,"state":"open","created_at":"2015-02-14T00:32:58Z","updated_at":"2015-10-24T22:43:07Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-10-08T10:38:54Z","updated_at":"2015-10-27T17:00:29Z","closed_at":"2015-10-09T19:37:08Z","body":"Hello,\r\n\r\nI believe the weightedVar function is incorrect because of the term (n / (n-1L)).  \r\n\r\nHere's a fix:\r\n\r\nDELETED w <- w / sum(w)\r\n\r\n  if (is.null(center)) {\r\n    center <- sum(w / sum(w) * x)\r\n  }\r\n  x <- x - center\r\n  x <- x^2\r\n  sigma2 <- sum(w * x) / (sum(w) - 1L)\r\n  x <- w <- NULL\r\n  sigma2\r\n\r\nThis version yields the same results as wtd.var from package Hmisc.\r\n\r\nRegards\r\nWolfgang"},"comment":{"url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/issues/comments/151569337","html_url":"https://github.com/HenrikBengtsson/matrixStats/issues/72#issuecomment-151569337","issue_url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/issues/72","id":151569337,"user":{"login":"HenrikBengtsson","id":1616850,"avatar_url":"https://avatars.githubusercontent.com/u/1616850?v=3","gravatar_id":"","url":"https://api.github.com/users/HenrikBengtsson","html_url":"https://github.com/HenrikBengtsson","followers_url":"https://api.github.com/users/HenrikBengtsson/followers","following_url":"https://api.github.com/users/HenrikBengtsson/following{/other_user}","gists_url":"https://api.github.com/users/HenrikBengtsson/gists{/gist_id}","starred_url":"https://api.github.com/users/HenrikBengtsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HenrikBengtsson/subscriptions","organizations_url":"https://api.github.com/users/HenrikBengtsson/orgs","repos_url":"https://api.github.com/users/HenrikBengtsson/repos","events_url":"https://api.github.com/users/HenrikBengtsson/events{/privacy}","received_events_url":"https://api.github.com/users/HenrikBengtsson/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T17:00:29Z","updated_at":"2015-10-27T17:00:29Z","body":"FYI, matrixStats 0.15.0 is now on CRAN and includes this fix. Thanks."}}