Learn R Programming

⚠️There's a newer version (1.4.1) of this package.Take me there.

LEGIT (version 1.3.1)

Latent Environmental & Genetic InTeraction (LEGIT) Model

Description

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 .

Copy Link

Version

Install

install.packages('LEGIT')

Monthly Downloads

196

Version

1.3.1

License

GPL-3

Maintainer

Alexia Jolicoeur-Martineau

Last Published

August 29th, 2019

Functions in LEGIT (1.3.1)

LEGIT_to_IMLEGIT

LEGIT to IMLEGIT
IMLEGIT_to_LEGIT

IMLEGIT to LEGIT
example_with_crossover

Simulated example of a 2 way interaction GxE model with crossover point.
IMLEGIT_net

Independent Multiple Latent Environmental & Genetic InTeraction (IMLEGIT) model with Elastic Net on the latent variables. Do not use on it's own, use elastic_net_var_select instead.
predict.IMLEGIT

Predictions of IMLEGIT fits
forward_step

Internal function that does the forward step for the stepwise function.
predict.LEGIT

Predictions of LEGIT fits
LEGIT

Latent Environmental & Genetic InTeraction (LEGIT) model
LEGIT_cv

Cross-validation for the LEGIT model
example_3way

Simulated example of a 3 way interaction GxExz model
longitudinal_folds

Longitudinal folds
summary.elastic_net_var_select

Summary function for the output of elastic_net_var_select
example_3way_3latent

Simulated example of a 3 way interaction GxExZ model
nes_var_select

Parallel natural evolutionary variable selection assuming bernouilli distribution (for IMLEGIT)
backward_step

Internal function that does the backward step for the stepwise IM function.
elastic_net_var_select

Elastic net for variable selection in IMLEGIT model
bootstrap_var_select

Bootstrap variable selection (for IMLEGIT)
IMLEGIT_cv

Cross-validation for the IMLEGIT model
rGE.IMLEGIT

Gene-Environment correlation estimation and testing of IMLEGIT models
best_model.elastic_net_var_select

Best model from elastic net variable selection
IMLEGIT

Independent Multiple Latent Environmental & Genetic InTeraction (IMLEGIT) model
summary.IMLEGIT

Summarizing IMLEGIT fits
r1nes_var_select

Parallel natural evolutionary variable selection assuming multivariate normal search distribution with a simple covariance matrix parametrization (for IMLEGIT)
summary.LEGIT

Summarizing LEGIT fits
example_2way

Simulated example of a 2 way interaction GxE model.
GxE_interaction_RoS

Regions of significance using Johnson-Neyman technique
GxE_interaction_test

Testing of the GxE interaction
best_model

Best model
stepwise_search_IM

Stepwise search for the best subset of elements in the latent variables with the IMLEGIT model
stepwise_search

Stepwise search for the best subset of genetic variants or environments with the LEGIT model
backward_step_IM

Internal function that does the backward step for the stepwise IM function.
plot.elastic_net_var_select

Plot function for the output of elastic_net_var_select
plot.LEGIT

Plot
genetic_var_select

Parallel genetic algorithm variable selection (for IMLEGIT)
forward_step_IM

Internal function that does the forward step for the stepwise function.
rGE.LEGIT

Gene-Environment correlation estimation and testing of LEGIT models
rGE

Gene-Environment correlation estimation and testing