$$P_{iqv} = \frac{exp(\zeta_{ik} - \lambda_{ik} \theta_j)}{\sum_{v=1}^{m} exp(\zeta_{iv} - \lambda_{iv} \theta_j)}$$
nrm(reshOBJ,etastart=-0.1, ctrl=list())
## S3 method for class 'nrm':
summary(object, RETURN=FALSE, \dots)
## S3 method for class 'nrm':
print(x, \dots)
## S3 method for class 'nrm':
deviance(object, \dots)
## S3 method for class 'nrm':
logLik(object, \dots)reshMG function.nrm.nrm.$ulstv gives the used starting values for the first EM stepetastart denote the estimable parameters of the model. For example, for an item with 4 categories, 3 $\gamma$'s (which substitute the 4 $\zeta$'s) and 3 $\xi$'s (which substitute the 4 $\lambda$'s) are constrained for normalization (parameter sets add up to zero). The following arguments can be comitted within a list (ctrl argument):
nodesA numerical vector of length 1. Set the number of quadrature nodes/points for the a-priori distribution. The distribution is assumed to be normal. Default:21absrangeA numerical vector of length 1. Denotes the absolute range of the a-priori distribution. The default value is 5, so the normal distribution ranges from$[-5 ; 5]$.verboseIf TRUE, the estimation process is displayed in terms of the actual EMstep. Default:TRUEsigmaestIf TRUE, the variance of the latent person distribution is estimated. Otherwise it is set to 1 (for each group). Default:FALSEexacA numerical vector of length 1. If the difference between two consecutive EM steps (sum of absolute difference of parameters) is not larger than 'exac' - the estimation stops. Default:0.00001EMmaxA numerical vector of length 1. This argument sets the maximum number of EM steps. The default value is 500. Feel free to enlarge this number. Default:500NRmaxA numerical vector of length 1. This argument sets the maximum number of Newton Raphson steps within the M-Step of the EM Algorithm. Default:20NRexacA numerical vector of length 1. If the difference between two consecutive NR steps is not larger than 'exac' - the estimation stops. Default:0.01ClistA list which contains informations about which parameters should be held constant during estimation. Each list element has to look similar to this expression: "eta\\d* = -*\\d*" (of course real digits instead of Regexes!). The termetarefers to a column in the Q matrix in the reshape object which actually represents the parameters. The right side of the equation is the constant the parameter should be set to. So an entry in theClistcould look like "eta2 = -1" which means that the second eta parameter will not be estimated and is set to the value of -1.nonparIf TRUE, the prior distribution is nonparametric and is reestimated in each EM step by use of the expected number of examinees on each quadrature node. Default: FALSE. Computations are based on the EH (empirical histogram) estimation method of Woods (2007, 2011). It is possible to estimate EHs for more than one group. First experiences showed that a huge amount of EM steps are needed (> 5000) to approximate the latent ability distributions.quadsSupply specific quadrature nodes and weights for nonparametric estimation (nparmust be TRUE). It has to be a list of length = number of groups. Inside each list element a list with two elements (a vector of nodes and a vector of weights) is expected. To get an idea what this looks like usemcIRT:::quadIT(nodes=15,ngr=2).Baker, F. B., & Kim, S.-H. (2004). Item response theory. Parameter estimation techniques (2nd ed.). New York, NY: Marcel-Dekker.
Harwell, M. R., Baker, F. B. & Zwarts, M. (1988). Item parameter estimation via marginal maximum likelihood and an EM algorithm: A didactic. Journal of Educational Statistics, 13, 243-271.
Woods, C. M. (2007). Empirical Histograms in Item Response Theory With Ordinal Data. Education and Psychological Measurement, 67:1, 73-87.
Woods, C. M. (2011). DIF Testing With an Empirical-Histogram Approximation of the Latent Density for Each Group. Applied Measurement in Education, 24:3, 256-279.
reshMG# Simulating 3 Items within a loop
ParList <- lapply(1:3,function(x)
{
Item1 <- c(c(-2,-1,1,2),c(-1.2,0.3,0.2,0.7))
names(Item1) <- c(paste("zeta",1:4,sep=""),paste("lamb",1:4,sep=""))
Item1
})
names(ParList) <- paste("item",1:3,sep="")
# simulate person parameters
perp1 <- rnorm(1100,0,1)
# simulate data.frame
sim.nrm.1 <- NRM.sim(ParList,perp1)
# reshape
reshdat1 <- reshMG(sim.nrm.1,items=1:3,correct=rep(0,3))
# fit the nrm with a maximum number of 40 EM iterations, which is NOT recommanded
# and is just applied here because estimating the model during example checks on cran
# took too long with default settings
res.nrm <- nrm(reshdat1)
summary(res.nrm)Run the code above in your browser using DataLab