[R] how to adjust link function in logistic regression to predict the proportion of correct responses in 2AFC task?

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Dec 16 08:42:46 CET 2006


On Sat, 16 Dec 2006, Ken Knoblauch wrote:

> In theory, the probability of correct responses ranges between 0.5 and 1 
> here, but in practice it is frequent to find cases where the observed 
> proportion of correct responses is a little less.  The number of trials 
> is limited, after all.  The inverse of this link function generates a 
> Nan when this occurs.  Is that a problem? and if so, how can it be dealt 
> with here?

No. Links apply to fitted values, not observed proportions, and R link 
functions have a validity function to ensure they are used correctly.


> Thank you.
>
> I have used the gnlr function in Lindsey's gnlm package for this problem in
> the past, but glm would be simpler, it seems to me.
>
> @Article{pmid16817511,
>  Author="Yssaad-Fesselier, Rosa and Knoblauch, Kenneth",
>  Title="{{M}odeling psychometric functions in {R}}",
>  Journal="Behav Res Methods",
>  Year="2006",
>  Volume="38",
>  Number="1",
>  Pages="28--41",
>  Month="Feb"
> }
>
>
>
>> On Sat, 16 Dec 2006, baud-bovy.gabriel at hsr.it wrote:
>> 
>>> I have would like to use logistic regression to analyze the
>>> percentage of correct responses in a 2 alternative forced
>>> choice task. The question is whether one needs to take into
>>> account the fact expected probabilities for the percentage of
>>> correct responses ranges between 0.5 and 1 in this case.
>> 
>> Yes.
>> 
>>> Second, how can one implement a link function of the
>>> type f(x) = (1+exp(x)/(1+exp(x)))/2 in R?
>> 
>> Looking at make.link() should give you enough to go on.
>> 
>>> Third, can it be also done with gee and/or glmm?
>> 
>> For gee, you need to change the C-level internals. (I've done this in the
>> far past for S-PLUS but not for R.)  It would be easier to use yags (but I
>> think you still need to dive into the internals).
>> 
>> What 'glmm' did you have in mind?  Looks like e.g. glmmML and glmmPQL will
>> work with the new link.
>> 
>> [...]
>> 
>> Someone may have been here already: e.g.
>> http://www.pubmedcentral.nih.gov/articlerender.fcgi?artid=1434755
>> 
>> -- 
>> 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 272866 (PA)
>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>
> --
> Ken Knoblauch
> Inserm U371
> Institut Cellule Souche et Cerveau
> Département Neurosciences Intégratives
> 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.lyon.inserm.fr/371/

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


More information about the R-help mailing list