[R-sig-ME] Bradley Terry GLMM in R ?

iiori@@@wickeim@ier m@iii@g oii u@i-tuebi@ge@@de iiori@@@wickeim@ier m@iii@g oii u@i-tuebi@ge@@de
Fri Oct 7 16:35:25 CEST 2022


> We want to fit Bradley-Terry-style GLMM models in R. We looked into:
>
> https://cran.r-project.org/web/packages/BradleyTerry2/vignettes/BradleyTerry.pdf
> and
> http://bbolker.github.io/mixedmodels-misc/glmmFAQ.html
>
> We have voter-specific variables x that influence which political message
> (i vs j) wins for them:
>
> logit[pr(i beats j | person with covariate x)] = lambda_i - lambda_j +
> (beta_i - beta_j) x
>
> We then model parameters as random effects:
> lambda_i ~ N(0, sigma_lambda)
> beta_i ~ N(0, sigma_beta)
>
> Is there a way to do this in R ? We do this in TensorFlow in Python by
> directly specifying design matrices with the 0,-1,1 or 0,-x,x entries.
> However, I do not see how to do this in R using lme4, BradleyTerry2, mgcv,
> etc.
>
> Thanks so much,
> Shira

Not directly what you asked for, but since you have voter covariates,
you could have a look at a tree-based Bradley-Terry model as implemented
in psychotree::bttree().

Best, Florian

---
Florian Wickelmaier
Department of Psychology
University of Tuebingen
http://www.mathpsy.uni-tuebingen.de/wickelmaier/



More information about the R-sig-mixed-models mailing list