[R] how to incorporate prior base probabilities into binomial glmm

Ken Knoblauch ken.knoblauch at inserm.fr
Fri Feb 18 14:15:19 CET 2011


sprocket <toelch <at> gmail.com> writes:

> 
> 
> Hi,
> 
> I am modeling a gen linear mixed model with binomial 
repeated measures
> responses (y=cbind(correct/not correct)) of some 
individuals (id).
> I have a 2X2 design (effort and costs) and another 
continuous independent
> variable (scr). This will lead to something like this:
> 
> mod.1<-lmer(y~effort+costs+scr+(1|id),family=binomial)
>  so far so good. In my experiment the probability 
to score a correct depends
> also on a probability based on random choice. Short 
example: Individual 1
> has to choose 5 times before a correct can happen 
in the high effort
> condition while in the low effort condition Ind 1 only 
has to choose 3
> times. So there is a different probability associated 
to the low and high
> effort condition that an individual will choose correct.
> How can I incorporate this into a model or does 
anybody know of paper where
> a similar case has occurred?
> 
> Ulf
> 

I think that you have to define a new factor that distinguishes the
two levels of strong effort, say EffortLeve l( for lack of imagination 
on a Friday afternoon) and then from what you describe, the
subjects are nested in this, i.e., some had a high effort of 5
and others of 3.  Perhaps, the following would work then

glmer(y ~ EffortLevel/(effort + costs + scr) + (1 | id), family = binomial)

I think that if each observer has a unique id, that the nesting
will be automatic for this variable, but you should verify that.

-- 
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-help mailing list