Parameter estimations is done by CML method.
MPRMl(data, desmat, ldes, lp, start)
optim
)optim
)ldes
and lp
. ldes
is a numerical vector of the same length as item category parameters in the general MPRM. A 0 in this vector indicates that no restriction is set. Putting in another number sets the item category parameter according to the vector position as linear dependent to that item category parameter with the position of the number included. For example, if item category parameter of item 1 and category 2 (that is position 2 in the vector ldes
) should be linear dependent to the item category parameter of item 1 and category 1 (that is position 1 in the vector ldes
), than the number 1 has to be on the second element of vector ldes
. With the vector lp
it is set, how many different scoring parameters have to be estimated and (if there are more than two) which of them should be equal. For example if 5 item category parameters are set linear dependent (by ldes
) and according to the ldes
vector the first, third and fourth have the same scoring parameters and the second and fifth have another scoring parameter, than lp
must be a vector lp = c(1,2,1,1,2)
. It is necessary that the design matrix is specified in accordance with the restrictions in ldes
and lp
.
Fischer, G. H. (1974). Einfuehrung in die Theorie psychologischer Tests [Introduction to test theory]. Bern: Huber.
Rasch, G. (1961). On general laws and the meaning of measurement in psychology, Proceedings Fourth Berekely Symposium on Mathematical Statistiscs and Probability 5, 321-333.
MPRM
#simulate data set according to the general MPRM
simdat <- simMPRM(rbind(matrix(c(-1.5,0.5,0.5,1,0.8,-0.3, 0.2,-1.2), ncol=4),0), 500)
#estimate the general MPRM
res_mprm <- MPRM(simdat$datmat)
#estimate a MPRM with linear restrictions;
#for item 1 and 2 the second category is set linear dependent to the first category
ldes1 <- rep(0,length(res_mprm$itempar))
ldes1[c(2,5)] <- c(1,4)
lp1 <- rep(1,2)
#take the design matrix from the general MPRM and modify it according to the linear restriction
design1 <- res_mprm$design
design1[2,1] <- 1
design1[5,3] <- 1
design1[11,c(1,3)] <- -1
design1 <- design1[,-c(2,4)]
res_mprml <- MPRMl(simdat$datmat, desmat=design1, ldes=ldes1, lp=lp1)
summary(res_mprml)
Run the code above in your browser using DataLab