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@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@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]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to