This is a core function of the pseudo-likelihood algorithm for items of the nominal model. The function calls function 'ItemData' to create the data frame for input into 'mlogit', which is use to fit a conditional multinomial model (i.e., a discrete choice model) for each item. The up-dated scale are put into the Master data frame and added to the item.log array. Generally the function would not run outside of 'fit.nominal' or 'ple.lma'.
ItemLoop(
Master,
item.log,
Phi.mat = Phi.mat,
PersonByItem,
npersons,
nitems,
ntraits,
ncat,
nless,
TraitByTrait,
pq.mat,
LambdaName,
NuName,
fitem
)
Current master frame
Iteration history for the items parameters
Current estimate of Phi.mat
Person by item adjacency matrix (same as inData)
Number of persons
Number of items
Number of traits
Number of categories
Number of unique lambda and unique nus (ncat-1)
TraitsByTrait adjacency matrix (sam as TraitAdj)
One dimensional array for computing rest-scores
Marginal effect names used in formula and item data frame for item regressions
Scale values names in used in formula and item data frame for item regressions
Formula for item regression
Master Master data frame up-dated scale values for all items
item.log Iteration history of item parameters where the last row showing results from the current iteration