[R-sig-ME] Psychometric curves with glmm

Ken Knoblauch ken.knoblauch at inserm.fr
Fri Jun 14 09:10:01 CEST 2013


Donald Edward Frederick <donald at ...> writes:

> 
> Hello all,
> 
......
> Rats (n=8) are trained to discriminate between two stimuli (A,B).
> Each rat is tested on four (4) different stimulus pairs (
> (A1,B1),(A2,B2),...).
> Each rat is tested on each pair for three days. The stimulus pair
> presentation order is randomly selected.
> Each day consists of ~300 trials evenly split between the two stimuli.
> 
> I would like to construct a psychometric curve of performance against
> sampling duration. The rats select their own 'sampling duration' for each
> presentation on each trial. I am interested in knowing if there is a
> general effect where stimulus sampling duration predicts performance (I
> expect a sigmoidal relationship). I also want to model the effects of the
> stimulus set, the stimulus (A,B), and day when accounting for the random
> effects (Subject, StimulusSet, Day).
> 
.....
> My current model is:
> 
> glmer(Correct ~
> SampleDuration+StimulusSet+Stimulus+Day+(StimulusSet:Day|Subject),
> family=binomial(link="logit"), data=g)
> 
> When I run this, my results are not unexpected, but I'm always leery of
> this. I *think* that this model fits the fixed effects of 
(SampleDuration,
> StimulusSet,Stimulus, and Day). Additionally, I fit a 
random intercept for
> each subject and a random slope for each subject that varies by
> StimulusSet:Day.
> 
> I expect that there are some individual differences 
between the Subjects. I
> also expect that there will be differences between 
StimulusSets and Days.
> Specifically, some StimulusSets are easier than others and there is
> learning from Day 1 to Day 3.
> 
> Does this all make sense, or, have I ventured down a terrible path?
> 
> Thanks
> 
> Donald
> 

A couple of thoughts.

Is Correct a binary variable representing the response on individual
trials, i.e., taking on two values, say 0/1?  or is it either the
proportion of correct responses or the number?  If it is the
proportion then you want to include a weights argument with
the number of trials and if it is the number, then it would
be better that Correct is a 2 column matrix with Correct
and Incorrect columns.

Is this a two-alternative forced-choice situation, i.e., 
would the sigmoids lower asymptote be expected to
be at 0.5 instead of 0?  If so, you might consider using
the mafc.logit link function from the psyphy package
but you would have to use the development version
of lme4 for it to work.

Since rats choose SampleDuration, do you want it to be
a random slope term as well?

Your random term, (StimulusSet:Day|Subject), gives the overall
variability for subject within each combination of StimulusSet and Day.
You might want to consider terms like (1 | Subject/Day) that
give a random intercept for both Subject and Subject:Day. This is
equivalent to having terms (1 | Subject) + (1 | Subject:Day).
You would have to think more deeply as to how to include all of the
terms in your experiment but that might get you started.

Hope that is helpful.

best,

Ken

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