Introduction to the Elja package"

library(Elja)
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")

Environment-Wide Association Studies (EWAS) are the study of the association between a health event and several exposures one after the other. With this package, it is possible to carry out an EWAS analysis in the simplest way and to display easily interpretable results in the output.

To do this, you must first define several points:

The Elja package works step by step to perform an EWAS analysis:

This document introduces the basic use of this package in an EWAS analysis.

Data: PimaIndiansDiabetes

In order to show in a simple way the use of the Elja package, we will use the PIMA dataset. This dataset is present in the package mlbench (https://mlbench.github.io/).

library(mlbench)
data(PimaIndiansDiabetes)
head(PimaIndiansDiabetes)

This dataset containing a health event (diabetes) will allow us to to illustrate the functioning of the Elja package.

Preparation of the data set

Before performing the function, we have to make sure that the dataset is well structured.

To do so, we have to check 2 elements:

str(PimaIndiansDiabetes)

Diabetes, which is our target health event, stands alone with exposures. In addition, the variables all have the correct class associated.

Determine the type of model you want to use

According to the class of the outcome, one model will be preferred to another. It is therefore necessary to choose the right model for the type of variable chosen as the health event.

We have seen previously that our health event is binary categorical: Diabetes (Yes/No).

str(PimaIndiansDiabetes$diabetes)

We can therefore use a logistic regression model.

Use of the ELJAlogistic function

The approach for the logistic regression is similar for the models linear models with ELJAlinear function and for Generalized Linear Models with ELJAglm function.

The dataset being prepared and the type of model chosen, we can proceed to the analysis.

To do so, the following information are needed:

Other information can be added to the output of the function:

ELJAlogistic(var = 'diabetes',data = PimaIndiansDiabetes,manplot = TRUE,
             Bonferroni = TRUE,FDR = TRUE, nbvalmanplot = 30, manplotsign = FALSE)
results

We observe a Manhattan plot showing the results of the EWAS analysis and a dataframe showing the more detailed results.

References



Try the Elja package in your browser

Any scripts or data that you put into this service are public.

Elja documentation built on July 9, 2023, 5:27 p.m.