{"action":"created","issue":{"url":"https://api.github.com/repos/mtorchiano/effsize/issues/23","repository_url":"https://api.github.com/repos/mtorchiano/effsize","labels_url":"https://api.github.com/repos/mtorchiano/effsize/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/mtorchiano/effsize/issues/23/comments","events_url":"https://api.github.com/repos/mtorchiano/effsize/issues/23/events","html_url":"https://github.com/mtorchiano/effsize/issues/23","id":215348882,"number":23,"title":"Problem with noncentral confidence interval estimation","user":{"login":"mtorchiano","id":6343439,"avatar_url":"https://avatars3.githubusercontent.com/u/6343439?v=3","gravatar_id":"","url":"https://api.github.com/users/mtorchiano","html_url":"https://github.com/mtorchiano","followers_url":"https://api.github.com/users/mtorchiano/followers","following_url":"https://api.github.com/users/mtorchiano/following{/other_user}","gists_url":"https://api.github.com/users/mtorchiano/gists{/gist_id}","starred_url":"https://api.github.com/users/mtorchiano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtorchiano/subscriptions","organizations_url":"https://api.github.com/users/mtorchiano/orgs","repos_url":"https://api.github.com/users/mtorchiano/repos","events_url":"https://api.github.com/users/mtorchiano/events{/privacy}","received_events_url":"https://api.github.com/users/mtorchiano/received_events","type":"User","site_admin":false},"labels":[{"id":163787188,"url":"https://api.github.com/repos/mtorchiano/effsize/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"mtorchiano","id":6343439,"avatar_url":"https://avatars3.githubusercontent.com/u/6343439?v=3","gravatar_id":"","url":"https://api.github.com/users/mtorchiano","html_url":"https://github.com/mtorchiano","followers_url":"https://api.github.com/users/mtorchiano/followers","following_url":"https://api.github.com/users/mtorchiano/following{/other_user}","gists_url":"https://api.github.com/users/mtorchiano/gists{/gist_id}","starred_url":"https://api.github.com/users/mtorchiano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtorchiano/subscriptions","organizations_url":"https://api.github.com/users/mtorchiano/orgs","repos_url":"https://api.github.com/users/mtorchiano/repos","events_url":"https://api.github.com/users/mtorchiano/events{/privacy}","received_events_url":"https://api.github.com/users/mtorchiano/received_events","type":"User","site_admin":false},"assignees":[{"login":"mtorchiano","id":6343439,"avatar_url":"https://avatars3.githubusercontent.com/u/6343439?v=3","gravatar_id":"","url":"https://api.github.com/users/mtorchiano","html_url":"https://github.com/mtorchiano","followers_url":"https://api.github.com/users/mtorchiano/followers","following_url":"https://api.github.com/users/mtorchiano/following{/other_user}","gists_url":"https://api.github.com/users/mtorchiano/gists{/gist_id}","starred_url":"https://api.github.com/users/mtorchiano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtorchiano/subscriptions","organizations_url":"https://api.github.com/users/mtorchiano/orgs","repos_url":"https://api.github.com/users/mtorchiano/repos","events_url":"https://api.github.com/users/mtorchiano/events{/privacy}","received_events_url":"https://api.github.com/users/mtorchiano/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-03-20T07:53:40Z","updated_at":"2017-03-20T09:57:33Z","closed_at":null,"body":"From email on March 19, 2017\r\n\r\n>I have a question regarding cohen.d function. \r\n>I am trying to use this function to calculate confidence intervals for effect size using non-central t distribution for 500 samples. However, the function does not run inside a for loop if non-central=TRUE, even for small loops such as a loop of 2.\r\n> Here is the code that I have used:\r\n>\r\n>```\r\n># I generate two independent normal random samples size 10 with 500 repetition\r\n> \r\n>x1 <-matrix(0,10,500)\r\n>x2 <-matrix(0,10,500)\r\n>\r\n>for (i in 1:500) {\t\r\n>  x1[,i] <- rnorm(10,9,2)\r\n>  x2[,i] <- rnorm(10,8,2)\r\n>\r\n>       }\r\n>\r\n>####Then I calculate confidence intervals for effect size using non-central t distribution\r\n>\r\n>lb<-c(0)\r\n>ub<-c(0)\r\n>for (i in 1:500) {\r\n>  \r\n>  cohen.dres<-cohen.d(x1[,i],x2[,i],hedges.correction = FALSE, noncentral =TRUE)\r\n>  lb[i]<-cohen.dres$conf.int[1]  ##saving the lower limit in a vector\r\n>  ub[i]<-cohen.dres$conf.int[2]  ##saving the upper limit in a vector\r\n>  }\r\n>```\r\n> However, as I mentioned function cohen.d in the above for loop does not work.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mtorchiano/effsize/issues/comments/287715857","html_url":"https://github.com/mtorchiano/effsize/issues/23#issuecomment-287715857","issue_url":"https://api.github.com/repos/mtorchiano/effsize/issues/23","id":287715857,"user":{"login":"mtorchiano","id":6343439,"avatar_url":"https://avatars3.githubusercontent.com/u/6343439?v=3","gravatar_id":"","url":"https://api.github.com/users/mtorchiano","html_url":"https://github.com/mtorchiano","followers_url":"https://api.github.com/users/mtorchiano/followers","following_url":"https://api.github.com/users/mtorchiano/following{/other_user}","gists_url":"https://api.github.com/users/mtorchiano/gists{/gist_id}","starred_url":"https://api.github.com/users/mtorchiano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtorchiano/subscriptions","organizations_url":"https://api.github.com/users/mtorchiano/orgs","repos_url":"https://api.github.com/users/mtorchiano/repos","events_url":"https://api.github.com/users/mtorchiano/events{/privacy}","received_events_url":"https://api.github.com/users/mtorchiano/received_events","type":"User","site_admin":false},"created_at":"2017-03-20T09:57:32Z","updated_at":"2017-03-20T09:57:32Z","body":"After looking into details, I found a bug in the code that identifies the range for the ncp estimation.\r\n\r\nThe bug makes a loop non-converging, in practice a never ending loop is entered.\r\n\r\nMWE \r\n```\r\na = c(9.81605624621576, 8.93891560898168, 9.05436620537713, 6.01771305071382, \r\n8.98575772172126, 7.2595761413452, 13.7537304479165, 9.89861975363729, \r\n7.37246838418731, 8.33888742066376)\r\nb = c(8.62798051757027, 5.25390514295654, 12.0869496333763, 7.20553319908951, \r\n6.99017188584104, 8.22363490828756, 8.05485287987422, 6.50534569228974, \r\n8.68871033652186, 4.62897740315003)\r\ncohen.d(a,b,hedges.correction = FALSE, noncentral =TRUE)\r\n```"}}
{"actor":{"display_login":"mtorchiano"}}