@@ -262,7 +262,24 @@ ESTIMATION <- function(data, model, group, itemtype = NULL, guess = 0, upper = 1
262262 customGroup = customGroup [[1L ]], spline_args = spline_args , monopoly.k = monopoly.k ,
263263 fulldata = opts $ PrepList [[1L ]]$ fulldata , key = key , opts = opts ,
264264 gpcm_mats = gpcm_mats , internal_constraints = opts $ internal_constraints ,
265- dcIRT_nphi = opts $ dcIRT_nphi , dentype = opts $ dentype , item.Q = opts $ item.Q )
265+ dcIRT_nphi = opts $ dcIRT_nphi , dentype = opts $ dentype , item.Q = opts $ item.Q ,
266+ groupName = Data $ groupNames [1 ])
267+ if (length(unique(Data $ model $ x [,' OptionalGroups' ])) > 1 ){
268+ for (g in 2 : Data $ ngroups )
269+ PrepList [[g ]] <-
270+ PrepData(data = Data $ data , model = Data $ model , itemtype = itemtype , guess = guess ,
271+ upper = upper , parprior = parprior , verbose = opts $ verbose ,
272+ technical = opts $ technical , parnumber = 1L , BFACTOR = opts $ dentype == ' bfactor' ,
273+ grsm.block = Data $ grsm.block , rsm.block = Data $ rsm.block ,
274+ mixed.design = mixed.design , customItems = customItems ,
275+ customItemsData = customItemsData ,
276+ customGroup = customGroup [[1L ]], spline_args = spline_args , monopoly.k = monopoly.k ,
277+ fulldata = opts $ PrepList [[1L ]]$ fulldata , key = key , opts = opts ,
278+ gpcm_mats = gpcm_mats , internal_constraints = opts $ internal_constraints ,
279+ dcIRT_nphi = opts $ dcIRT_nphi , dentype = opts $ dentype , item.Q = opts $ item.Q ,
280+ groupName = Data $ groupNames [g ])
281+
282+ }
266283 if (! is.null(dots $ Return_PrepList )) return (PrepListFull )
267284 if (! is.null(itemtypefull )){
268285 for (g in 2L : nrow(itemtypefull )){
@@ -276,7 +293,8 @@ ESTIMATION <- function(data, model, group, itemtype = NULL, guess = 0, upper = 1
276293 customGroup = customGroup [[1L ]], spline_args = spline_args , monopoly.k = monopoly.k ,
277294 fulldata = opts $ PrepList [[1L ]]$ fulldata , key = key , opts = opts ,
278295 gpcm_mats = gpcm_mats , internal_constraints = opts $ internal_constraints ,
279- dcIRT_nphi = opts $ dcIRT_nphi , dentype = opts $ dentype , item.Q = opts $ item.Q )
296+ dcIRT_nphi = opts $ dcIRT_nphi , dentype = opts $ dentype , item.Q = opts $ item.Q ,
297+ groupName = Data $ groupNames [g ])
280298 }
281299 }
282300 }
@@ -291,7 +309,7 @@ ESTIMATION <- function(data, model, group, itemtype = NULL, guess = 0, upper = 1
291309 matrix (sapply(PrepListFull $ pars , function (y ) length(y @ parnum )), nrow = 1L )
292310 for (g in seq_len(Data $ ngroups )){
293311 if (g != 1L ){
294- if (is.null(itemtypefull ))
312+ if (is.null(itemtypefull ) && length(unique( Data $ model $ x [, ' OptionalGroups ' ])) == 1 )
295313 PrepList [[g ]] <- list (pars = PrepList [[1L ]]$ pars )
296314 else attr(PrepList [[g ]]$ pars , ' nclasspars' ) <-
297315 sapply(PrepList [[g ]]$ pars , function (y ) length(y @ parnum ))
0 commit comments