[R] item characteristic curves (logistic regression w. constant)
Jonathan Baron
baron at cattell.psych.upenn.edu
Thu Jan 3 23:58:12 CET 2002
I'm trying to do a sort of home-brew item-characteristic-curve.
This is a plot of the probability of getting a test item correct,
as a function of the mean score on the test. (The last part is
the home brew part.)
Logistic regression with glm would work nicely, EXCEPT for the
fact that the curve requires a guessing parameter. So the
asymptote on the left is not 0 but rather something like .25 (for
a 4-choice multiple-choice item).
So I have been using nls. I have tried out the "least squares"
fit on artificial data, and it is not a problem at the level I'm
doing this. (In fact, I have a suspicion that it is never a
problem, but let's put that aside.)
The trouble is that nls rarely converges. When I plot the data
graphically, they look OK. Nice, monotonic, ogive-like plots
(using categories on the horizontal axis).
To make it concrete, here is a typical call to nls.
logit <- function(x) {exp(x)/(1+exp(x))}
nls(score[,1]~logit((mscore-A)/B)+D)),start=list(A=.5,B=.1,C=.2,D=.8)
The variable mscore is the mean score, ranging 0-1, and score[,1]
is 0/1, meaning incorrect/correct on the item in question (item 1).
Sometimes this works and yields very good fits. But sometimes it
diverges, or fails to converge.
Any ideas about how to make this work better? or do something else?
Jon Baron
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list