# Is there a package in R which implements the weighted maximum likelihood method?

Is there a package in R which implements the weighted maximum likelihood method (Warm, 1996) for estimating the person parameters in Rasch Models?

-

To the best of my knowledge (though I would be happy to be corrected) the main package in R for Rasch models is eRm, which fits the person and item parameters through conditional maximum likelihood. It interfaces to nlm, which is a general function for non linear optimisation so you might be able to code up the method yourself. If you install eRm and run the vignette("eRm") you'll get quite a readable introduction.

If you are just looking for IRT methods (not specifically Rasch models) you could check out ltm, which does 2 and 3 parameter models, and mokken which carries out non parametric IRT. I believe there is a package mirt which fits multivariate IRT models, but I have not used it so I cannot say too much about it.

Also, if you need to find a particular function in R, use the sos package. Install it from the usual sources, load it and then use the findFn() command.

For example, findFn("mixed Rasch") brings up quite a number of results, some of which may be useful to you.

-
I was unable to turn up anything as well. To the OP: the Task View on psychometric models may be of interest: cran.r-project.org/web/views/Psychometrics.html It doesn't seem that "weighted maximum likelihood" is mentioned anywhere in the packages' documentations, but I'm not an expert on this matter, so I may be missing something. –  Iterator Aug 16 '11 at 11:52
By the way, the eRm vignette mentions that the Warm (1989) approach will be added to a future version - see p. 11 of cran.r-project.org/web/packages/eRm/vignettes/eRm.pdf. –  Iterator Aug 16 '11 at 11:54
@Iterator - thanks I had a feeling that i'd heard the term somewhere in the R documentation before. –  richiemorrisroe Aug 16 '11 at 13:56
@richiemorrisroe - Thank you very much for your help, I think there isn't really any package for weighted MLE, I've checked all the packages in the Task View. So I really might have to code up the method myself. –  Paul Illg Aug 17 '11 at 7:19
Also I haven't found any library for mixed-Rasch in and Hybrid Models- Is it really possible that there isn't anything in R for these useful and rather common models? –  Paul Illg Aug 17 '11 at 7:27

Indeed WCML is very interessant for estimation of CAT results when perfect are possible (for the first items).

So weighted maximum likelihood method for ability estimation has been written by David Magis in his package for simulation of CATs in R.

The function is called thetaEst in his package catR. Estimation is possible for one to 4 parameters models. I advice you to use his package(s).

But WCML can lead to misestimation of ability. See for example Precision of Warm’s Weighted Likelihood Estimation of Ability for a Polytomous Model in CAT, Shudong Wang and Tianyou Wang, ACT Research Reports (1999)

-
Unfortunately thetaEst only estimates person parameters for dichotomous data... my data is polytomous. –  Paul Illg Aug 18 '11 at 15:04

Looks like I'm quite late to the game here, but the 'mirt' package package can estimate WLE scores for dichotomous and polytomous models. You start by fitting, say, a graded response model to your data (or whatever your model may be, PCM, generalized PCM, nominal, rating scale, etc; see ?mirt for the possible options) then compute either a table summary of the factor scores or a complete dataset using the option full.scores = TRUE:

#E.g. with 4-item Science data
library('mirt')
(mod <- mirt(Science, 1, itemtype = 'graded'))

Call:
mirt(data = Science, model = 1, itemtype = 'graded')

Full-information item factor analysis with 1 factors
Converged in 19 iterations with 40 quadrature.
Log-likelihood = -1607.198
AIC = 3246.395
AICc = 3253.847
BIC = 3309.935
SABIC = 3259.168
G^2 = 217.03, df = 73, p = 0
TLI = 0.494, RMSEA = 0.071

tablescores <- fscores(mod, method='WLE')

Comfort Work Future Benefit Freq         F1 SE_F1
[1,]       1    1      1       1    2       -Inf    NA
[2,]       1    3      2       1    1 -2.1390397    NA
[3,]       1    4      2       3    1 -1.1550628    NA
[4,]       1    4      3       1    1 -0.6048675    NA
[5,]       2    1      1       1    1 -9.2213762    NA
[6,]       2    1      2       4    1 -1.8969813    NA


There also is the more traditional ML, MAP, and EAP scores too, in case you wanted to compare.

-