Skip to content

Commit

Permalink
fix mixture ACOV
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Aug 11, 2018
1 parent 7102031 commit 1f39651
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions R/EMstep.group.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/test-04-multipleGroup.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 1f39651

Please sign in to comment.