campsych / concerto-platform

Concerto Platform - Open-Source Online Adaptive Testing Platform
https://concertoplatform.com/
Apache License 2.0
151 stars 88 forks source link

Problem with GRM CAT with 5 response options? #333

Open jakekraska opened 3 years ago

jakekraska commented 3 years ago

Concerto Platform version

v.5.1.0

Expected behavior

Can select any of 5 response options.

Actual behavior

Test works when select any of first 4 response options, however when selecting response option 5 ("Always" in the below example) the following error occurs:

Error in if (optF(RANGE[1]) < 0 & optF(RANGE[2]) < 0) res <- RANGE[1] else {: missing value where TRUE/FALSE needed

Error occurs only when "calculate theta" is turned on. Turn this off and the error does not occur.

Probably something I am doing wrong but not sure what?

Steps to reproduce the issue

id,question,responseOptions,trait,fixedIndex,p1,p2,p3,p4,p5,p6,p7,p8,p9,skippable,instructions
1,item1,"{""type"":""options"",""optionsRandomOrder"":""0"",""options"":[{""label"":""Never"",""value"":""1"",""fixedIndex"":""1""},{""label"":""Rarely"",""value"":""2"",""fixedIndex"":""2""},{""label"":""Sometimes"",""value"":""3"",""fixedIndex"":""3""},{""label"":""Often"",""value"":""4"",""fixedIndex"":""4""},{""label"":""Always"",""value"":""5"",""fixedIndex"":""5""}],""painMannequinGender"":""female"",""painMannequinGenderValue"":""male"",""defaultScore"":""0"",""scoreMap"":[{""value"":""1"",""score"":""1"",""trait"":""testtrait""},{""value"":""2"",""score"":""2"",""trait"":""testtrait""},{""value"":""3"",""score"":""3"",""trait"":""testtrait""},{""value"":""4"",""score"":""4"",""trait"":""testtrait""},{""value"":""5"",""score"":""5"",""trait"":""testtrait""}],""gracelyScaleShow"":""both"",""painMannequinAreaMultiMarks"":""1"",""optionsColumnsNum"":""0""}",testtrait,,2.558267269,-1.412699652,-0.449193878,0.5150491,1.5179461,,,,,0,
2,item2,"{""type"":""options"",""optionsRandomOrder"":""0"",""options"":[{""label"":""Never"",""value"":""1"",""fixedIndex"":""1""},{""label"":""Rarely"",""value"":""2"",""fixedIndex"":""2""},{""label"":""Sometimes"",""value"":""3"",""fixedIndex"":""3""},{""label"":""Often"",""value"":""4"",""fixedIndex"":""4""},{""label"":""Always"",""value"":""5"",""fixedIndex"":""5""}],""painMannequinGender"":""female"",""painMannequinGenderValue"":""male"",""defaultScore"":""0"",""scoreMap"":[{""value"":""1"",""score"":""1"",""trait"":""testtrait""},{""value"":""2"",""score"":""2"",""trait"":""testtrait""},{""value"":""3"",""score"":""3"",""trait"":""testtrait""},{""value"":""4"",""score"":""4"",""trait"":""testtrait""},{""value"":""5"",""score"":""5"",""trait"":""testtrait""}],""gracelyScaleShow"":""both"",""painMannequinAreaMultiMarks"":""1"",""optionsColumnsNum"":""0""}",testtrait,,2.428943133,-1.735082857,-0.641619104,0.513486909,1.644453149,,,,,0,
alinaoshina commented 2 years ago

same problem with developing a test w adaptive length. Problem disappears if I add another column to the itembank with a constant. Depending of the value of the constant the resulting theta scores distribution moves along the x-axis.