[R] item characteristic curves (logistic regression w. constant)

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Jan 4 08:44:55 CET 2002


Try the function SSfpl, which finds its own starting values.
Or modify the three-parameter version in MASS (and I think you can just
use that by using 1 - score).

Did you intend to have C in your formula?  nls is trying to optimize over
it, and it does not appear, so it is going to have difficulty converging.

Maximizing the likelihood using optim is not much harder.


On Thu, 3 Jan 2002, Jonathan Baron wrote:

> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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