{
  "_id": "6a103602acfb0bcc41c99ed7",
  "Package": "LEGIT",
  "Title": "Latent Environmental & Genetic InTeraction (LEGIT) Model",
  "Version": "1.4.1",
  "Date": "2024-01-23",
  "Author": "Alexia Jolicoeur-Martineau\n<alexia.jolicoeur-martineau@mail.mcgill.ca>",
  "Maintainer": "Alexia Jolicoeur-Martineau\n<alexia.jolicoeur-martineau@mail.mcgill.ca>",
  "Description": "Constructs genotype x environment interaction (GxE) models\nwhere G is a weighted sum of genetic variants (genetic score)\nand E is a weighted sum of environments (environmental score)\nusing the alternating optimization algorithm by\nJolicoeur-Martineau et al. (2017) <arXiv:1703.08111>. This\napproach has greatly enhanced predictive power over traditional\nGxE models which include only a single genetic variant and a\nsingle environmental exposure. Although this approach was\noriginally made for GxE modelling, it is flexible and does not\nrequire the use of genetic and environmental variables. It can\nalso handle more than 2 latent variables (rather than just G\nand E) and 3-way interactions or more. The LEGIT model produces\nhighly interpretable results and is very parameter-efficient\nthus it can even be used with small sample sizes (n < 250).\nTools to determine the type of interaction (vantage\nsensitivity, diathesis-stress or differential susceptibility),\nwith any number of genetic variants or environments, are\navailable <arXiv:1712.04058>. The software can now produce\nmixed-effects LEGIT models through the lme4 package.",
  "License": "GPL-3",
  "Encoding": "UTF-8",
  "RoxygenNote": "7.3.0",
  "VignetteBuilder": "knitr",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-12 07:01:37 UTC",
    "User": "root"
  },
  "Config/pak/sysreqs": "cmake make libicu-dev libuv1-dev",
  "Repository": "https://alexiajm.r-universe.dev",
  "Date/Publication": "2024-01-25 02:41:55 UTC",
  "RemoteUrl": "https://github.com/cran/LEGIT",
  "RemoteRef": "HEAD",
  "RemoteSha": "d19facb6fce429a20c4e22def4e020bf83c0e391",
  "MD5sum": "98b423528af63186e97e18a89159ad55",
  "_user": "alexiajm",
  "_type": "src",
  "_file": "LEGIT_1.4.1.tar.gz",
  "_fileid": "0f0eb00c96e50a3c6276fbf7cfea1a667c075fc1aeacf6cfdbd3d5ae0cf3d98d",
  "_filesize": 1309513,
  "_sha256": "0f0eb00c96e50a3c6276fbf7cfea1a667c075fc1aeacf6cfdbd3d5ae0cf3d98d",
  "_created": "2026-05-12T07:01:37.000Z",
  "_published": "2026-05-22T10:54:58.196Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77365547256,
      "time": 145,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6937739032"
    },
    {
      "job": 77365547428,
      "time": 151,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6937741083"
    },
    {
      "job": 77365546938,
      "time": 191,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6937753747"
    },
    {
      "job": 77365546902,
      "time": 177,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6937748074"
    },
    {
      "job": 77365546840,
      "time": 254,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6937696669"
    },
    {
      "job": 77365546557,
      "time": 127,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7158801760"
    },
    {
      "job": 77365547009,
      "time": 112,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6937729466"
    },
    {
      "job": 77365547083,
      "time": 144,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6937738980"
    },
    {
      "job": 77365546918,
      "time": 95,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6937724764"
    }
  ],
  "_buildurl": "https://github.com/r-universe/alexiajm/actions/runs/25718719792",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/cran/LEGIT",
  "_commit": {
    "id": "d19facb6fce429a20c4e22def4e020bf83c0e391",
    "author": "Alexia Jolicoeur-Martineau <alexia.jolicoeur-martineau@mail.mcgill.ca>",
    "committer": "cran-robot <csardi.gabor+cran@gmail.com>",
    "message": "version 1.4.1\n",
    "time": 1706150515
  },
  "_maintainer": {
    "name": "Alexia Jolicoeur-Martineau",
    "email": "alexia.jolicoeur-martineau@mail.mcgill.ca",
    "login": "alexiajm",
    "twitter": "@jm_alexia",
    "uuid": 18491553
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "formula.tools",
      "role": "Depends"
    },
    {
      "package": "stats",
      "role": "Depends"
    },
    {
      "package": "graphics",
      "role": "Depends"
    },
    {
      "package": "pROC",
      "role": "Imports"
    },
    {
      "package": "foreach",
      "role": "Imports"
    },
    {
      "package": "snow",
      "role": "Imports"
    },
    {
      "package": "doSNOW",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "iterators",
      "role": "Imports"
    },
    {
      "package": "Hmisc",
      "role": "Imports"
    },
    {
      "package": "grDevices",
      "role": "Imports"
    },
    {
      "package": "boot",
      "role": "Imports"
    },
    {
      "package": "RColorBrewer",
      "role": "Imports"
    },
    {
      "package": "glmnet",
      "role": "Imports"
    },
    {
      "package": "lme4",
      "role": "Imports"
    },
    {
      "package": "methods",
      "role": "Imports"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    }
  ],
  "_owner": "cran",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [],
  "_tags": [],
  "_stars": 0,
  "_contributors": [
    {
      "user": "alexiajm",
      "count": 15,
      "uuid": 18491553
    }
  ],
  "_userbio": {
    "uuid": 18491553,
    "type": "user",
    "name": "Alexia Jolicoeur-Martineau",
    "description": "I build generative AI for images, videos, text, tabular data, NN weights, molecules, and video game"
  },
  "_downloads": {
    "count": 215,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/LEGIT"
  },
  "_mentions": 2,
  "_searchresults": 35,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/LEGIT.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "manual.pdf"
  ],
  "_realowner": "alexiajm",
  "_cranurl": false,
  "_releases": [
    {
      "version": "1.0.0",
      "date": "2017-02-13"
    },
    {
      "version": "1.0.1",
      "date": "2017-03-24"
    },
    {
      "version": "1.0.2",
      "date": "2017-04-02"
    },
    {
      "version": "1.0.3",
      "date": "2017-04-09"
    },
    {
      "version": "1.0.4",
      "date": "2017-04-17"
    },
    {
      "version": "1.1.0",
      "date": "2017-05-11"
    },
    {
      "version": "1.1.1",
      "date": "2017-05-21"
    },
    {
      "version": "1.2.0",
      "date": "2017-12-08"
    },
    {
      "version": "1.2.1",
      "date": "2018-02-07"
    },
    {
      "version": "1.2.2",
      "date": "2018-06-21"
    },
    {
      "version": "1.2.3",
      "date": "2019-05-19"
    },
    {
      "version": "1.3",
      "date": "2019-07-26"
    },
    {
      "version": "1.3.1",
      "date": "2019-08-30"
    },
    {
      "version": "1.4.0",
      "date": "2022-01-12"
    },
    {
      "version": "1.4.1",
      "date": "2024-01-24"
    }
  ],
  "_exports": [
    "backward_step",
    "backward_step_IM",
    "best_model",
    "bootstrap_var_select",
    "elastic_net_var_select",
    "example_2way",
    "example_2way_lme4",
    "example_3way",
    "example_3way_3latent",
    "example_with_crossover",
    "forward_step",
    "forward_step_IM",
    "genetic_var_select",
    "GxE_interaction_RoS",
    "GxE_interaction_test",
    "IMLEGIT",
    "IMLEGIT_cv",
    "IMLEGIT_net",
    "IMLEGIT_to_LEGIT",
    "LEGIT",
    "LEGIT_cv",
    "LEGIT_to_IMLEGIT",
    "longitudinal_folds",
    "nes_var_select",
    "r1nes_var_select",
    "rGE",
    "stepwise_search",
    "stepwise_search_IM"
  ],
  "_help": [
    {
      "page": "best_model",
      "title": "Best model",
      "topics": [
        "best_model"
      ]
    },
    {
      "page": "best_model.elastic_net_var_select",
      "title": "Best model from elastic net variable selection",
      "topics": [
        "best_model.elastic_net_var_select"
      ]
    },
    {
      "page": "bootstrap_var_select",
      "title": "Bootstrap variable selection (for IMLEGIT)",
      "topics": [
        "bootstrap_var_select"
      ]
    },
    {
      "page": "elastic_net_var_select",
      "title": "Elastic net for variable selection in IMLEGIT model",
      "topics": [
        "elastic_net_var_select"
      ]
    },
    {
      "page": "example_2way",
      "title": "Simulated example of a 2 way interaction GxE model.",
      "topics": [
        "example_2way"
      ]
    },
    {
      "page": "example_2way_lme4",
      "title": "Simulated example of a 3 way interaction GxExZ model",
      "topics": [
        "example_2way_lme4"
      ]
    },
    {
      "page": "example_3way",
      "title": "Simulated example of a 3 way interaction GxExz model",
      "topics": [
        "example_3way"
      ]
    },
    {
      "page": "example_3way_3latent",
      "title": "Simulated example of a 3 way interaction GxExZ model",
      "topics": [
        "example_3way_3latent"
      ]
    },
    {
      "page": "example_with_crossover",
      "title": "Simulated example of a 2 way interaction GxE model with crossover point.",
      "topics": [
        "example_with_crossover"
      ]
    },
    {
      "page": "genetic_var_select",
      "title": "Parallel genetic algorithm variable selection (for IMLEGIT)",
      "topics": [
        "genetic_var_select"
      ]
    },
    {
      "page": "GxE_interaction_RoS",
      "title": "Regions of significance using Johnson-Neyman technique",
      "topics": [
        "GxE_interaction_RoS"
      ]
    },
    {
      "page": "GxE_interaction_test",
      "title": "Testing of the GxE interaction",
      "topics": [
        "GxE_interaction_test"
      ]
    },
    {
      "page": "IMLEGIT",
      "title": "Independent Multiple Latent Environmental & Genetic InTeraction (IMLEGIT) model",
      "topics": [
        "IMLEGIT"
      ]
    },
    {
      "page": "IMLEGIT_cv",
      "title": "Cross-validation for the IMLEGIT model",
      "topics": [
        "IMLEGIT_cv"
      ]
    },
    {
      "page": "IMLEGIT_net",
      "title": "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.",
      "topics": [
        "IMLEGIT_net"
      ]
    },
    {
      "page": "IMLEGIT_to_LEGIT",
      "title": "IMLEGIT to LEGIT",
      "topics": [
        "IMLEGIT_to_LEGIT"
      ]
    },
    {
      "page": "LEGIT",
      "title": "Latent Environmental & Genetic InTeraction (LEGIT) model",
      "topics": [
        "LEGIT"
      ]
    },
    {
      "page": "LEGIT_cv",
      "title": "Cross-validation for the LEGIT model",
      "topics": [
        "LEGIT_cv"
      ]
    },
    {
      "page": "LEGIT_to_IMLEGIT",
      "title": "LEGIT to IMLEGIT",
      "topics": [
        "LEGIT_to_IMLEGIT"
      ]
    },
    {
      "page": "longitudinal_folds",
      "title": "Longitudinal folds",
      "topics": [
        "longitudinal_folds"
      ]
    },
    {
      "page": "nes_var_select",
      "title": "Parallel natural evolutionary variable selection assuming bernouilli distribution (for IMLEGIT)",
      "topics": [
        "nes_var_select"
      ]
    },
    {
      "page": "plot.elastic_net_var_select",
      "title": "Plot function for the output of elastic_net_var_select",
      "topics": [
        "plot.elastic_net_var_select"
      ]
    },
    {
      "page": "plot.LEGIT",
      "title": "Plot",
      "topics": [
        "plot.LEGIT"
      ]
    },
    {
      "page": "predict.IMLEGIT",
      "title": "Predictions of IMLEGIT fits",
      "topics": [
        "predict.IMLEGIT"
      ]
    },
    {
      "page": "predict.LEGIT",
      "title": "Predictions of LEGIT fits",
      "topics": [
        "predict.LEGIT"
      ]
    },
    {
      "page": "r1nes_var_select",
      "title": "Parallel natural evolutionary variable selection assuming multivariate normal search distribution with a simple covariance matrix parametrization (for IMLEGIT)",
      "topics": [
        "r1nes_var_select"
      ]
    },
    {
      "page": "rGE",
      "title": "Gene-Environment correlation estimation and testing",
      "topics": [
        "rGE"
      ]
    },
    {
      "page": "rGE.IMLEGIT",
      "title": "Gene-Environment correlation estimation and testing of IMLEGIT models",
      "topics": [
        "rGE.IMLEGIT"
      ]
    },
    {
      "page": "rGE.LEGIT",
      "title": "Gene-Environment correlation estimation and testing of LEGIT models",
      "topics": [
        "rGE.LEGIT"
      ]
    },
    {
      "page": "stepwise_search",
      "title": "Stepwise search for the best subset of genetic variants or environments with the LEGIT model",
      "topics": [
        "stepwise_search"
      ]
    },
    {
      "page": "stepwise_search_IM",
      "title": "Stepwise search for the best subset of elements in the latent variables with the IMLEGIT model",
      "topics": [
        "stepwise_search_IM"
      ]
    },
    {
      "page": "summary.elastic_net_var_select",
      "title": "Summary function for the output of elastic_net_var_select",
      "topics": [
        "summary.elastic_net_var_select"
      ]
    },
    {
      "page": "summary.IMLEGIT",
      "title": "Summarizing IMLEGIT fits",
      "topics": [
        "summary.IMLEGIT"
      ]
    },
    {
      "page": "summary.LEGIT",
      "title": "Summarizing LEGIT fits",
      "topics": [
        "summary.LEGIT"
      ]
    }
  ],
  "_rundeps": [
    "backports",
    "base64enc",
    "boot",
    "bslib",
    "cachem",
    "checkmate",
    "cli",
    "cluster",
    "codetools",
    "colorspace",
    "cpp11",
    "data.table",
    "digest",
    "doSNOW",
    "evaluate",
    "farver",
    "fastmap",
    "fontawesome",
    "foreach",
    "foreign",
    "Formula",
    "formula.tools",
    "fs",
    "ggplot2",
    "glmnet",
    "glue",
    "gridExtra",
    "gtable",
    "highr",
    "Hmisc",
    "htmlTable",
    "htmltools",
    "htmlwidgets",
    "isoband",
    "iterators",
    "jquerylib",
    "jsonlite",
    "knitr",
    "labeling",
    "lattice",
    "lifecycle",
    "lme4",
    "magrittr",
    "MASS",
    "Matrix",
    "memoise",
    "mime",
    "minqa",
    "nlme",
    "nloptr",
    "nnet",
    "operator.tools",
    "pROC",
    "R6",
    "rappdirs",
    "rbibutils",
    "RColorBrewer",
    "Rcpp",
    "RcppEigen",
    "Rdpack",
    "reformulas",
    "rlang",
    "rmarkdown",
    "rpart",
    "rstudioapi",
    "S7",
    "sass",
    "scales",
    "shape",
    "snow",
    "stringi",
    "stringr",
    "survival",
    "tinytex",
    "vctrs",
    "viridisLite",
    "withr",
    "xfun",
    "yaml"
  ],
  "_vignettes": [
    {
      "source": "ElasticNet.Rmd",
      "filename": "ElasticNet.html",
      "title": "Elastic Net",
      "author": "Alexia Jolicoeur-Martineau",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Elastic Net",
        "Example"
      ],
      "created": "2019-07-26 11:20:05",
      "modified": "2019-07-26 11:20:05",
      "commits": 1
    },
    {
      "source": "GxE_testing.Rmd",
      "filename": "GxE_testing.html",
      "title": "GxE Testing",
      "author": "Alexia Jolicoeur-Martineau",
      "engine": "knitr::rmarkdown",
      "headings": [
        "GxE testing",
        "Simulation of diathesis-stress, vantage sensitivity and differential susceptibility",
        "Example 1: Vantage sensitivity WEAK",
        "Example 2: Vantage sensitivity STRONG",
        "Example 3: Differential susceptibility WEAK",
        "Example 4: Differential susceptibility STRONG"
      ],
      "created": "2017-12-08 20:56:11",
      "modified": "2024-01-25 02:41:55",
      "commits": 5
    },
    {
      "source": "LEGIT.Rmd",
      "filename": "LEGIT.html",
      "title": "Latent Environmental & Genetic InTeraction (LEGIT) modelling",
      "author": "Alexia Jolicoeur-Martineau",
      "engine": "knitr::rmarkdown",
      "headings": [
        "The LEGIT model",
        "Examples of LEGIT models",
        "Algorithm",
        "Implementation",
        "Notes",
        "How to use the LEGIT package: Example 1",
        "How to use the LEGIT package: Example 2",
        "How to use the LEGIT package: Example 3"
      ],
      "created": "2017-02-13 22:59:40",
      "modified": "2022-01-11 21:52:53",
      "commits": 10
    }
  ],
  "_score": 3.3222192947339195,
  "_indexed": true,
  "_nocasepkg": "legit",
  "_universes": [
    "alexiajm"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.4.1",
      "date": "2026-05-12T07:03:52.000Z",
      "distro": "noble",
      "commit": "d19facb6fce429a20c4e22def4e020bf83c0e391",
      "fileid": "b9b7e7386fd9f60514e4581058e5c718227aa6af7a59bf91a4be366755a13fbe",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/alexiajm/actions/runs/25718719792"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.4.1",
      "date": "2026-05-12T07:04:02.000Z",
      "distro": "noble",
      "commit": "d19facb6fce429a20c4e22def4e020bf83c0e391",
      "fileid": "939e87b263b16bf815f2613a53f5318dd01c0cd9d8cb069ab4fd8340f2ca7cbc",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/alexiajm/actions/runs/25718719792"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.4.1",
      "date": "2026-05-12T07:04:50.000Z",
      "commit": "d19facb6fce429a20c4e22def4e020bf83c0e391",
      "fileid": "fa7a605f75d73fbe134a3beb54c97e7e94e9604a0e6bb6c6def7efd3c94fdd99",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/alexiajm/actions/runs/25718719792"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.4.1",
      "date": "2026-05-12T07:04:25.000Z",
      "commit": "d19facb6fce429a20c4e22def4e020bf83c0e391",
      "fileid": "6acdd20919489b57c300fff82b407a053412dabf88fb91078157c476a94419be",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/alexiajm/actions/runs/25718719792"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.4.1",
      "date": "2026-05-12T07:03:13.000Z",
      "commit": "d19facb6fce429a20c4e22def4e020bf83c0e391",
      "fileid": "e723594d71f7786d7d941be8d2698f4cbd9ba3a894a92463869ff599abf13ea6",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/alexiajm/actions/runs/25718719792"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.4.1",
      "date": "2026-05-12T07:03:44.000Z",
      "commit": "d19facb6fce429a20c4e22def4e020bf83c0e391",
      "fileid": "bcf474c73c478f02a9cbe34b423ac37e240ff05806cc9f4689714e10ab87de57",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/alexiajm/actions/runs/25718719792"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.4.1",
      "date": "2026-05-12T07:02:57.000Z",
      "commit": "d19facb6fce429a20c4e22def4e020bf83c0e391",
      "fileid": "e80f94c2285099c20163705089c246c5bbd5879f7fa4a9ebd942d83d07e06a1f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/alexiajm/actions/runs/25718719792"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.4.1",
      "date": "2026-05-22T10:54:42.000Z",
      "commit": "d19facb6fce429a20c4e22def4e020bf83c0e391",
      "fileid": "00192b0ccfb795283ae3723e22738237b80c164403dd960ea770246903d7653a",
      "status": "success",
      "buildurl": "https://github.com/r-universe/alexiajm/actions/runs/25718719792"
    }
  ]
}