[R-sig-ME] Bradley Terry GLMM in R ?
Shira Mitchell
@h|r@qotj @end|ng |rom gm@||@com
Fri Oct 7 03:02:45 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
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list