[R-sig-ME] Logistic and nonlinear mixed models: Accounting for guessing probability
Ken Knoblauch
ken.knoblauch at inserm.fr
Mon Sep 27 17:50:41 CEST 2010
Robert Miller <miller at ...> writes:
> Recently i tried to predict the discrimination probability of a chemosignal
> by its concentration and an experimental manipulation factor (term:
> concentration*x + test*b + concentration*test*c + d) with nested factor
> "manipulation" within "participants". For statistical analysis i needed to
> incorporate a fixed guessing probability into my model (similiar to a 3-PL
> IRT model) resulting in the following equation:
> P(correct) = 0.33 + 0.67*(exp(term)/(1 + exp(term)))
> As i found no way to do so via the glmer()-function of the lme4-package, i
> tried to use nlmer() but unfortunately even the simplest analysis with just
> the concentration factor and intercept resulted in cryptic error messages.
> Syntax:
> library(lme4)
> rawdata <- read.csv2("http://dl.dropbox.com/u/7147679/AND_data.csv")
>
> mod1 <- glmer(Correct ~ log(Concentrat) * Test + (Test|Code), family =
> binomial, data=rawdata) #works fine but is inappropriate
> Thank you
> Robert Miller
My understanding is that you cannot do this with glmer
out of the box, as the link functions are built in at the
level of the C code. You would have to modify that
and reinstall it.
An alternative that you might consider, is to use
the glmmPQL function from the MASS package and
the mafc.logit link from my package psyphy.
I think that your model would be something like this
(untried):
library(MASS)
library(psyphy)
glmmPQL(Correct ~ log(Concentrat) * Test,
family = binomial(mafc.logit(3)),
data = rawdata, random = list(Code = ~ Test))
but someone can (will hopefully) correct me if I've
gotten it wrong.
Ken
--
Ken Knoblauch
Inserm U846
Stem-cell and Brain Research Institute
Department of Integrative Neurosciences
18 avenue du Doyen Lépine
69500 Bron
France
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: +33 (0)6 84 10 64 10
http://www.sbri.fr/members/kenneth-knoblauch.html
More information about the R-sig-mixed-models
mailing list