fit.gpcm {pleLMA} | R Documentation |
Fits LMA model where category scale values equal a_im * x_j
Description
Function estimates the parameters of LMA models with fixed category scores multiplied by an item weight parameter. This function can be used to estimate the LMA model corresponding to is a generalized partial credit model for multi-category items and the 2 parameter logistic model for dichotomous items. The function sets up log objects and model formula. In the case of unidimensional models, the function iterates over item regressions; whereas, for multidimensional models, the function iterates between the item and phi regressions. This function is called from 'ple.lma', but can be run outside of 'ple.lma'.
Usage
fit.gpcm(
Master,
Phi.mat,
PersonByItem,
TraitByTrait,
item.by.trait,
tol,
npersons,
nitems,
ncat,
nless,
ntraits,
Maxnphi,
pq.mat,
starting.sv,
ItemNames,
LambdaName,
LambdaNames,
PhiNames
)
Arguments
Master |
Master data set in long format |
Phi.mat |
Matrix of starting values of association parameters |
PersonByItem |
Person by item matrix of responses (same as inData) |
TraitByTrait |
Trait by trait adjacency matrix (same as inTraitAdj) |
item.by.trait |
Item by trait vector indicating trait item load on (same as inItemTraitAdj) |
tol |
Criterion used to determine convergence |
npersons |
Number of persons |
nitems |
Number of items |
ncat |
Number of categories per item |
nless |
Number of categories minus 1 (i.e., unique lambdas) |
ntraits |
Number of latent traits |
Maxnphi |
Number of phi parameters to be estimated |
pq.mat |
Used to compute rest-scores and totals |
starting.sv |
Fixed category scores |
ItemNames |
Names of items needed label output |
LambdaName |
Names of lambdas needed for formula of the item regressions |
LambdaNames |
Names of lambdas needed for formula of the stacked regression |
PhiNames |
Name of phi parameters (Null for uni-dimensional models) |
Value
item.log History over iterations of the algorithm for items' log likelihood, lambda, and a parameter
phi.log History over iterations of the algorithm for log likelihood, lambdas nd phi parameters
criterion Current value of the convergence statistic which is the maximum of items' absolute differences between the current and previous value of the log likelihood
estimates An item by parameter matrix of estimated item parameter where the first column are items' log likelihood
Phi.mat Estimated matrix of association parameters
fitem Formula for item data
fstack Formula for stacked data
item.mlogit Summary from final run of mlogit for item regressions for each item
phi.mlogit Summary from final run mlogit for stacked regression
mlpl.item Value of maximum of log ple function from fitting items (i.e., sum of logLike)
mlpl.phi Value of maximum of log ple function from stacked regression to get phi estimates
AIC Akaike information criterion for pseudo-likelihood (smaller is better)
BIC Bayesian information criterion for pseudo-likelihood (smaller is better)
Examples
data(dass)
inData <- dass[1:250,c("d1", "d2", "a1","a2","s1","s2")]
#--- unidimensional
inTraitAdj <- matrix(1, nrow=1, ncol=1)
inItemTraitAdj <- matrix(1, nrow=6, ncol=1)
# Need to set up data
s <- set.up(inData, model.type='gpcm', inTraitAdj, inItemTraitAdj, tol=1e-03)
g <- fit.gpcm(s$Master, s$Phi.mat, s$PersonByItem, s$TraitByTrait,
s$item.by.trait, s$tol, s$npersons, s$nitems, s$ncat,
s$nless, s$ntraits, s$Maxnphi, s$pq.mat, s$starting.sv,
s$ItemNames, s$LambdaName, s$LambdaNames, s$PhiNames)