[R] how to adjust link function in logistic regression to predict the proportion of correct responses in 2AFC task?
baud-bovy.gabriel at hsr.it
baud-bovy.gabriel at hsr.it
Sat Dec 16 12:45:03 CET 2006
At 07:01 AM 12/16/2006, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
>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
Thank you for your reply and the above link. I am not sure yet which
function to use. I am new at logistic regression for repeated-measure
designs and its various implementations in R.
glmmML seems to require changes at the C-level:
<http://www.stat.umu.se/forskning/reports/glmmML.pdf>http://www.stat.umu.se/forskning/reports/glmmML.pdf
The new link might apparently be added to glmmPQL entirely at the
R-level.
>Looking at make.link() should give you enough to go on.
If I understood your suggestion well, it is sufficient to add a new
link for the binomial family by extending the make.link function
and adding, say, a "half-logit" link (both for the glm and lme call in
glmPQL).
Then, the call to glmmPQL could be
glmmPQL(resp~shape*ecc*kappa,
random=~1|subject,
family=binomial("half-logit"),
data,
correlation=corCompSymm(form=~1|subject))
assuming that resp=1 if response is correct and 0 otherwise,
a random intercept (as in glmmML) and an "exchangeable" correlation structure.
Note that it might be better to specify a "random slope" in
this context (since proportions are expected to vary between 0.5 and 1
for all subjects, the main difference being that some subjects might
have a steeper S-shaped curve than others) but I am not sure how to do it.
Regards,
Gabriel Baud-Bovy
UHSR University, Milan, Italy
More information about the R-help
mailing list