Skip to content

Commit

Permalink
fix rev dep check
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Feb 28, 2023
1 parent 45f031c commit 1459a0e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: mirt
Version: 1.38
Version: 1.38.1
Type: Package
Title: Multidimensional Item Response Theory
Authors@R: c( person("Phil", family="Chalmers", email =
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Changes in mirt 1.38
# Changes in mirt 1.38.1

- infit and outfit statistics can now be computed in `itemfit()` when missing
data are present (requested by Hanif on the mirt-package forum:
Expand Down
11 changes: 6 additions & 5 deletions R/SingleGroup-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,7 @@ mirt2traditional <- function(x, vcov, nfact){
opar <- par <- x@par
which.a <- which(x@par[1L:nfact] != 0)
if(length(which.a) != 1L) return(x)
a.nms <- if(nfact == 1L) 'a' else paste0('a', 1L:nfact)
if(cls != 'GroupPars')
ncat <- x@ncat
if(cls == 'dich'){
Expand Down Expand Up @@ -1683,7 +1684,7 @@ mirt2traditional <- function(x, vcov, nfact){
par[nfact + 1L] <- -par[nfact + 1L]/par[which.a]
par[nfact + 2L] <- plogis(par[nfact + 2L])
par[nfact + 3L] <- plogis(par[nfact + 3L])
names(par) <- c(paste0('a', 1L:nfact), 'b', 'g', 'u')
names(par) <- c(a.nms, 'b', 'g', 'u')
} else if(cls == 'graded'){
fns <- vector('list', ncat + nfact-1L)
for(i in 2L:ncat - 1L){
Expand All @@ -1702,7 +1703,7 @@ mirt2traditional <- function(x, vcov, nfact){
par[i+nfact] <- -par[i+nfact]/par[which.a]
delta_index[[i+nfact]] <- c(which.a, i+nfact)
}
names(par) <- c(paste0('a', 1L:nfact), paste0('b', 2:ncat-1L))
names(par) <- c(a.nms, paste0('b', 2:ncat-1L))
} else if(cls == 'gpcm'){
fns <- vector('list', ncat+nfact)
for(i in 2L:ncat-1L){
Expand Down Expand Up @@ -1739,7 +1740,7 @@ mirt2traditional <- function(x, vcov, nfact){
}
delta_index[[nfact+1L]] <- c(which.a, ncat + nfact + 2L)
par <- c(x@par[1:nfact], newd)
names(par) <- c(paste0('a', 1:nfact), paste0('b', 1:length(newd)))
names(par) <- c(a.nms, paste0('b', 1:length(newd)))
x@est <- x@est[c(1:nfact, (ncat+nfact+2L):length(x@est))]
} else if(cls == 'nominal'){
if(nfact > 1L) return(x)
Expand All @@ -1766,7 +1767,7 @@ mirt2traditional <- function(x, vcov, nfact){
ds <- par[(ncat+2):length(par)]
ds <- ds - mean(ds)
par <- c(as, ds)
names(par) <- c(paste0('a', 1:ncat), paste0('c', 1:ncat))
names(par) <- c(a.nms, paste0('c', 1:ncat))
x@est <- rep(TRUE, ncat*2)
x@SEpar <- rep(as.numeric(NA), ncat*2)
} else if(cls == 'nestlogit'){
Expand Down Expand Up @@ -1812,7 +1813,7 @@ mirt2traditional <- function(x, vcov, nfact){
par1[2] <- -par1[2]/par1[1]
par1[3] <- plogis(par1[3])
par1[4] <- plogis(par1[4])
names(par1) <- c('a', 'b', 'g', 'u')
names(par1) <- c(a.nms, 'b', 'g', 'u')
par2 <- par[5:length(par)]
as <- par2[1:(ncat-1)]
as <- as - mean(as)
Expand Down

0 comments on commit 1459a0e

Please sign in to comment.