Skip to content
Prev 4520 / 20628 Next

Logistic and nonlinear mixed models: Accounting for guessing probability

Douglas Bates <bates at ...> writes:
wrote:
response,
generalized
parameter.
reason that
dealing with
Nonlinear 
models
in another 
so
which the
possible to use
necessary
for making
an error
such an error
to do
in that it
amount of
my classes right
First, let me say thanks for putting some time into this issue,
 though I can hear you; it's time that you don't have.

If either you are Martin can suggest some way that I could modify
the mafc functions in psyphy to make m visible, I would be
happy to change them, provided they still work with glm, or I would
just define special ones for mixed effects models, but that wouldn't
be as efficient.  For example, I would think that defining functions with
fixed m for 2, 3, and 4 (and possibly 8) would cover about 99% of 
the cases in my field, but I can't speak for others.  In fact, would the 
following work for the case m = 3 in your modified code,

mafc.logit3 <- function () 
{

    linkfun <- function(mu) {
        mu <- pmax(mu, 1/3 + .Machine$double.eps)
        qlogis((3 * mu - 1)/2)
    }
    linkinv <- function(eta) {
        1/3 + (2/3) * .Call("logit_linkinv", eta, PACKAGE = "stats")
    }
    mu.eta <- function(eta) (2/3) * .Call("logit_mu_eta", 
        eta, PACKAGE = "stats")
    valideta <- function(eta) TRUE
    link <- paste("mafc.logit()", sep = "")
    structure(list(linkfun = linkfun, linkinv = linkinv, mu.eta = mu.eta, 
        valideta = valideta, name = link), class = "link-glm")
}



Finally, there is also the ecc2 data set in the psyphy package, if you 
need another data set for testing.  It is from a 4-alternative experiment
in which an obtserver had to choose between 1 of 4 positions at which a 
low contrast letter appeared and then identify it as 1 of 4 possible letters. 
It gives the aggrergated proportion correct, not the individual binary 
responses, but I could dig them out (I still have all that data), if binary 
responses were preferred.

Good luck.

best,

Ken