{"action":"closed","issue":{"url":"https://api.github.com/repos/philchalmers/mirtCAT/issues/2","labels_url":"https://api.github.com/repos/philchalmers/mirtCAT/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/philchalmers/mirtCAT/issues/2/comments","events_url":"https://api.github.com/repos/philchalmers/mirtCAT/issues/2/events","html_url":"https://github.com/philchalmers/mirtCAT/issues/2","id":66885262,"number":2,"title":"Item selection for polytomous Items","user":{"login":"thersites9","id":11835254,"avatar_url":"https://avatars.githubusercontent.com/u/11835254?v=3","gravatar_id":"","url":"https://api.github.com/users/thersites9","html_url":"https://github.com/thersites9","followers_url":"https://api.github.com/users/thersites9/followers","following_url":"https://api.github.com/users/thersites9/following{/other_user}","gists_url":"https://api.github.com/users/thersites9/gists{/gist_id}","starred_url":"https://api.github.com/users/thersites9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thersites9/subscriptions","organizations_url":"https://api.github.com/users/thersites9/orgs","repos_url":"https://api.github.com/users/thersites9/repos","events_url":"https://api.github.com/users/thersites9/events{/privacy}","received_events_url":"https://api.github.com/users/thersites9/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-07T13:34:19Z","updated_at":"2015-04-07T14:02:13Z","closed_at":"2015-04-07T14:02:13Z","body":"Hi,\r\n\r\nI think there is a bug in the item selection mechanism für polytomous items:\r\n\r\n\r\n````{r}\r\n# simulate data for a GRM\r\na <- matrix(rlnorm(20,.2,.3))\r\ndiffs <- t(apply(matrix(runif(20*4, .3, 1), 20), 1, cumsum))\r\ndiffs <- -(diffs - rowMeans(diffs))\r\nd <- diffs + rnorm(20)\r\ndat <- simdata(a, d, 500, itemtype = 'graded')\r\n\r\n# estimate parameters\r\nfit <- mirt(dat, model=mirt.model('F1=1-20'),\r\n            itemtype=\"graded\")\r\n````\r\n\r\nItem selection using maximum Fisher Information works fine:\r\n````{r}\r\ndesign <- list(min_SEM = .02, min_items = 10, max_items = 10)\r\ncat1a  <- mirtCAT(mo=fit, local_pattern = dat[1:10,],\r\n                  start_item = 'MI', method=\"EAP\",\r\n                  criteria   = 'MI', design = design)\r\n````\r\n\r\nHowever, any other criterion  (e.g. MPWI, MEI), fails:\r\n````{r}\r\ncat1b  <- mirtCAT(mo=fit, local_pattern = dat[1:10,],\r\n                  start_item = 'MI', method=\"EAP\",\r\n                  criteria   = 'MPWI', design = design)\r\nError in .Primitive(\"+\")(0.00447009764530175, 0.00305388243702458, 0.00115289027322516,  : \r\n  operator needs one or two arguments\r\n````\r\n\r\nBest, Timo"}}