Skip to content

Commit

Permalink
fix poly cases
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Nov 10, 2024
1 parent 3214682 commit cae30f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/M2.R
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ M2 <- function(obj, type="M2*", calcNull = TRUE, quadpts = NULL, theta_lim = c(-
itemloc <- itemloc[-length(itemloc)]
was_na <- is.na(extract.mirt(obj, 'data'))
fulldata <- obj@Data$fulldata[[1L]]
N <- colSums(!is.na(fulldata))[-itemloc]
for(i in 1:(nitems)){
pick <- if(i == nitems) c(itemloc[i], ncol(fulldata))
else c(itemloc[i], itemloc[i+1]-1)
Expand Down

0 comments on commit cae30f1

Please sign in to comment.