diff --git a/R/EMstep.group.R b/R/EMstep.group.R index c63405fb3..9caf44dd8 100644 --- a/R/EMstep.group.R +++ b/R/EMstep.group.R @@ -451,6 +451,7 @@ EM.group <- function(pars, constrain, Ls, Data, PrepList, list, Theta, DERIV, so any.prior=FALSE, itemclass=10L, dat=matrix(sapply(1L:length(pars), function(g) sum(pars[[g]][[J+1L]]@rr)), 1L)) + mixtype@item.Q <- matrix(1, nrow = mixtype@ncat, ncol = mixtype@nfact) deriv <- Deriv(mixtype, Theta = matrix(1, 1L, length(pars)), estHess=TRUE) h[mixtype@parnum, mixtype@parnum] <- deriv$hess } else mixtype <- NULL diff --git a/tests/tests/test-04-multipleGroup.R b/tests/tests/test-04-multipleGroup.R index 688a6ebc6..bc4a68c49 100644 --- a/tests/tests/test-04-multipleGroup.R +++ b/tests/tests/test-04-multipleGroup.R @@ -63,7 +63,7 @@ test_that('one factor', { set.seed(1) mod_mixture <- suppressWarnings(multipleGroup(dat, 1, itemtype = 'Rasch', GenRandomPars = TRUE, verbose = FALSE, dentype = 'mixture-2', SE=TRUE)) - expect_equal(extract.mirt(mod_mixture, 'condnum'), 115.5747, tolerance=1e-4) + expect_equal(extract.mirt(mod_mixture, 'condnum'), 112.2736, tolerance=1e-4) so <- summary(mod_mixture, verbose=FALSE) expect_equal(so[[1]]$class_proportion, .512121, tolerance=1e-4)