Prepares data frame for input to 'mnlogit' for the stacked regression to obtain association parameters of the multidimensional LMA models corresponding to the Nominal item response model. This function is called from 'fit.nominal'. It generally would not run outside of either 'fit.nominal' or 'ple.lma'.
StackData(
Master,
item.log,
phi.log,
pq.mat,
npersons,
nitems,
ncat,
nless,
ntraits,
Maxnphi,
PhiNames,
LambdaNames
)
Master data frame from which stacked data is created
Last row contains current scale values (item.history)
Last row contains current estimates of phi
Summing array to get rest scores and totals
Number of persons
Number of items
Number of categories per item
Number of categories less 1 (i.e., unique lambdas and unique nus)
Number of latent traits
Number of phis to be estimated
Names of the Phi parameters
Names of lambdas that correspond to those in Master
Phi.mat Up-dated matrix of phi parameters
phi.log History of iterations for LogLike, Lambda and phi parameters