Closed Arjuntk closed 4 months ago
Hi,
I think you get the error because you have not the same modalities in the var1 and var2 variables between your "mydata" sample and "newdata". In the thresholds model, the number of parameters depends on the number of different values in the outcomes. For example, if var1 and var2 ranges both from 1 to 5, you have 8 threshold parameters. If in newdata the modality "3" is not observed for var2, the model expects 7 threshold parameters. A workaround in to add a virtual subject that has the missing modalities, in order to have the same number of parameters.
Viviane
I am trying to use predictClass on external data. I am using multlcmm model, below is my code:
I am getting below error when i run predictClass:
newdata is of the same format as mydata. i also tried running predictClass on mydata and it ran. But when I tried to run it on sample mydata, I get an error.
But if i run a sample of mydata, I get an error.
Please help me figure out this error. Thanks.