[R] Error in finding factor scores/ person ability in item response theory

nor azila nor@z||@chemu@@ @end|ng |rom gm@||@com
Fri Sep 8 01:09:47 CEST 2023


Dear R users,

I have encountered some error in finding factor scores/ person ability in
item response theory.
I tried a few times using ltm and mirt package but it still gave me error.

#TRY #1 - Fit GPCM model using ltm



> irt_model <- gpcm(response_matrix)

> irt_person_abilities <- fscores(irt_model)

*Error in object using Model : *

*  no applicable method for `@` applied to an object of class "gpcm"*





#TRY #2 - Fit  GPCM model using ltm



> irt_model <- gpcm(data = HT, constraint = "1PL")

> irt_person_abilities <- factor.scores(irt_model)

*Error in factor.scores(irt_model) : *

*  argument "f" is missing, with no default*





#TRY #3 - Fit GPCM model using mirt



> irt_model <- mirt(data = HT, model = "gpcm", itemtype = "graded")

*Error in model$x[i, "Type"] : subscript out of bounds*

*In addition: Warning message:*

*In cbind(model$x, OptionalGroups = "") :*

*  number of rows of result is not a multiple of vector length (arg 2)*

> irt_person_abilities_dim1 <- fscores(gpcm_model, method = "EAP", dims = 1)

*Error in object using Model : *

*  no applicable method for `@` applied to an object of class "gpcm"*


I am not sure which package is suitable with my data (Polytomous - Partial
Credit Model) and why it always turns out to be an error.

Thank you very much for any help given.

Azila.

	[[alternative HTML version deleted]]



More information about the R-help mailing list