I have been struggling with the same problem for the past few hours and am desperately in need of some help. The code I am running is as follows:
## opening a data set on the desktop setwd("C:/Users/haillie/Desktop") UN2010<- read.csv("UN2010.csv",header=TRUE) ##calling libraries library(reshape) library(car) ## these are the variables I want to recode colname <- names(UN2010) ## this applies the recode functionto all the variable I want to recode UN2010[colname] <- lapply(UN2010[colname], function(x) recode(x, recodes = "8=NA", as.factor.result = FALSE, as.numeric.result = TRUE)) UN2010frame<-data.matrix(lapply(UN2010,as.numeric)) ord.out1<-ordrating(UN2010, beta.constraint=1, tune=.035, ma=1, mb=-5, vinva=1, vinvb=0.05, gamma.start=c(-300, 0, 1.5, 3.0, 4.5, 300), thin=20, burnin=20000, mcmc=100000, verbose=1000) ########################################################## However, when i try to run the above ordrating code, an error message comes up " NA/NaN/Inf in foreign function call (arg 24)." Because I interpreted this as that this model has no ability to perform na.omit, I did na.omit myself using the code UN2010<-na.omit(UN2010). However, I encoutered another problem then. I recieved the below error messages this time.......................... Error in dimnames(x) <- dn : length of 'dimnames' [1] not equal to array extent In addition: Warning messages: 1: In min(Y, na.rm = TRUE) : no non-missing arguments to min; returning Inf 2: In max(Y, na.rm = TRUE) : no non-missing arguments to max; returning -Inf 3: In max(Y, na.rm = TRUE) : no non-missing arguments to max; returning -Inf > ############################################################## I have tried everything I could but nothing has worked so far. Any advice or help would be deeply appreciated. Thank you very much. Haillie -- View this message in context: http://r.789695.n4.nabble.com/error-message-while-running-IRT-model-tp3456603p3456603.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list 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.