Skip to content

Commit

Permalink
avoid name check
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Sep 19, 2024
1 parent e13c438 commit 60abb3f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions R/mod2values.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
#'
#' # use the converted values as starting values in a new model, and reduce TOL
#' mod2 <- mirt(dat, 1, pars = values, TOL=1e-5)
#' coef(mod2, simplify=TRUE)
#'
#' # use parameters on different dataset
#' mod3 <- mirt(expand.table(LSAT6), pars=values)
#' coef(mod3, simplify=TRUE)
#'
#' # supports differing itemtypes on second model
#' sv <- mirt(Science, itemtype=c('graded', rep('gpcm', 3)), pars='values')
Expand Down
4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -1219,8 +1219,8 @@ UpdatePrepList <- function(PrepList, pars, random, lr.random, clist, nclist,
if(nrow(currentDesign) != nrow(pars))
stop('Rows in supplied and starting value data.frame objects do not match. Were the
data or itemtype input arguments modified?', call.=FALSE)
if(!all(as.matrix(currentDesign[,c('group', 'item', 'class', 'name', 'parnum')]) ==
as.matrix(pars[,c('group', 'item', 'class', 'name', 'parnum')])))
if(!all(as.matrix(currentDesign[,c('group', 'class', 'name', 'parnum')]) ==
as.matrix(pars[,c('group', 'class', 'name', 'parnum')])))
stop('Critical internal parameter labels do not match those returned from pars = \'values\'',
call.=FALSE)
if(!all(sapply(currentDesign, class) == sapply(pars, class)))
Expand Down
5 changes: 5 additions & 0 deletions man/mod2values.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 60abb3f

Please sign in to comment.