[R] Error in analysis of Rasch using eRm package.
Dear R users, I am using eRm package in analysing my polytomous data as below Respondents = 277 people Item = 30 questions The data consists of 0,1,2,3 responses/answers. I'm having a problem in writing coding as below because I do not know what I should replace in each of the arguments. data.frame(..., row.names = NULL, check.rows = FALSE, check.names = TRUE, fix.empty.names = TRUE, stringsAsFactors = FALSE) Thank you very much for any help given. Azi. [[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.
[R] Error in analysis of arguments of Rasch
Dear R users, I am using ltm and eRm package in analysing my polytomous data for fitting item response theory and Rasch model, respectively. I'm having a problem with the error as below; > library(eRm) > library(ltm) > HT <- read.csv("C:/Dropbox/Analysis R_2023/HT.csv") > response_columns <- HT[, 1:ncol(HT)] > response_matrix <- as.matrix(response_columns) > irt_model <- grm(response_matrix) > rasch_model <- Rasch(response_matrix) Error in Rasch(response_matrix) : could not find function "Rasch" Then I changed the arguments of Rasch to RM, but it also turns out an error as below; > rasch_model <- RM(response_matrix) Error in datcheck(X, W, mpoints, groupvec, model) : Dichotomous data matrix required! Is there any problem with the arguments or any other problem with my coding since errors keep occurring when I want to run Rasch. Thank you very much for any help given. Azi. [[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.
[R] Error in finding factor scores/ person ability in item response theory
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.