Latent Environmental & Genetic InTeraction (LEGIT) Model

Constructs genotype x environment interaction (GxE) models where G is a weighted sum of genetic variants (genetic score) and E is a weighted sum of environments (environmental score) using the alternating optimization algorithm by Jolicoeur-Martineau et al. (2017) . This approach has greatly enhanced predictive power over traditional GxE models which include only a single genetic variant and a single environmental exposure. Although this approach was originally made for GxE modelling, it is flexible and does not require the use of genetic and environmental variables. It can also handle more than 2 latent variables (rather than just G and E) and 3-way interactions or more. The LEGIT model produces highly interpretable results and is very parameter-efficient thus it can even be used with small sample sizes (n < 250). Tools to determine the type of interaction (vantage sensitivity, diathesis-stress or differential susceptibility), with any number of genetic variants or environments, are available . The software can now produce mixed-effects LEGIT models through the lme4 package.


LEGIT v1.2.1 (Release date: 2018-02-07)


  • Documentation fixes
  • Bug with missing data in LEGIT fixed
  • Model fits of GxE testing are now ordered from best to worse
  • Added Plot.LEGIT option to change label
  • Changed rescale option in LEGIT to use the range [-1,1] rather than [0,1]. Why? Because if you had negative weights, the score variable was not garanteed to be in [0,1] but with [-1,1], it always is going to be in [-1,1].
  • Updated vignettes
  • Small other fixes

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.4.0 by Alexia Jolicoeur-Martineau, 10 days ago

Browse source code at

Authors: Alexia Jolicoeur-Martineau <[email protected]>

Documentation:   PDF Manual  

GPL-3 license

Imports pROC, foreach, snow, doSNOW, utils, iterators, Hmisc, grDevices, boot, RColorBrewer, glmnet, lme4

Depends on, stats, graphics

Suggests knitr, rmarkdown

See at CRAN