philchalmers / mirt

Multidimensional item response theory
https://philchalmers.github.io/mirt/
201 stars 75 forks source link

Formula error #176

Closed xizhao-rbx closed 4 years ago

xizhao-rbx commented 4 years ago

Dear author,

I noticed that the formula for gpcmIRT might be wrong. The location is line 214-215 in mirt.R: https://github.com/philchalmers/mirt/blob/441be05ddd0fa76bd39ab6329539db9872143df2/R/mirt.R#L214 https://github.com/philchalmers/mirt/blob/441be05ddd0fa76bd39ab6329539db9872143df2/R/mirt.R#L215

I think the normalizing factor should be \deqn{G = exp(1) + exp(1 + a(\theta - b1) + c) + exp(1 + a(2\theta - b1 - b2) + 2c)) + exp(1 + a(3\theta - b1 - b2 - b3) + 3c))}

Also, for line 178, should \sum_1^k be \sum_1^m, where m is the total number of categories?

philchalmers commented 4 years ago

Thanks, the exp(1| ) was indeed missing. Regarding the \sum_1^m I typically use k to represent the total number of categories in the package documentation. So the original presentation looks to be correct.

xizhao-rbx commented 4 years ago

Sorry I didn't make it clear. You have already used k to represent a specific score in this formula (P(X=k)), so I don't think you can use k to represent the total number. https://github.com/philchalmers/mirt/blob/2a3bb1f8fdf0ec820681f300b52f9f1a67a04ab5/R/mirt.R#L176

philchalmers commented 4 years ago

I see what you're saying. I'll go over the equations and use the capital K to reflect the total number of categorizes and lower case k for the specific observable instances. Thanks.

philchalmers commented 4 years ago

Should be patched now, but let me know if you see any other issues in the equations before I close the issue.

xizhao-rbx commented 4 years ago

I didn't find any other issues. Thanks for quick response!