ELJAglm: Generalized Linear Models regression for EnvWAS/EWAS analysis

View source: R/Elja.R

ELJAglmR Documentation

Generalized Linear Models regression for EnvWAS/EWAS analysis

Description

A tool for Environment-Wide Association Studies (EnvWAS / EWAS) which are repeated analysis. This function is espacially for generalized linear models 'glm' and allows the addition of adjustment variables.

Usage

ELJAglm(
  var,
  var_adjust = NULL,
  family = binomial(link = "logit"),
  data,
  manplot = TRUE,
  nbvalmanplot = 100,
  Bonferroni = FALSE,
  FDR = FALSE,
  manplotsign = FALSE
)

Arguments

var

A categorical and binary variable. It is generally your outcome.

var_adjust

A vector containing the names of the fixed adjustment variables for all the models.

family

The family and the link use for the glm function.

data

A dataframe containing all the variables needed for the analysis.

manplot

Generate a Manhattan plot of the results of the analysis.

nbvalmanplot

The number of variables to include in each Manhattan plot.

Bonferroni

Add a dashed bar to the Manhattan plot showing the Bonferroni significance threshold.

FDR

Add a dashed bar to the Manhattan plot showing the False Discovery Rate (Benjamini-Hochberg method) significance threshold. NA if all p-values > FDR corrected p-values.

manplotsign

Generates a Manhattan plot with only significant results (p<0.05).

Value

A Dataframe with results for each variable of the model.

References

Dunn OJ. Multiple Comparisons Among Means. Journal of the American Statistical Association. 1961;56(293):52โ€‘64. Benjamini Y, Hochberg Y. Controlling the False Discovery Rate: A Practical and Powerful Approach to Multiple Testing. Journal of the Royal Statistical Society: Series B (Methodological). 1995;57(1):289โ€‘300. MLBench ยท Distributed Machine Learning Benchmark. Available from: https://mlbench.github.io/ Smith JW, Everhart JE, Dickson WC, Knowler WC, Johannes RS. Using the ADAP Learning Algorithm to Forecast the Onset of Diabetes Mellitus. Proc Annu Symp Comput Appl Med Care. 1988 Nov 9;261โ€“5.

Examples

### Loading the PIMA dataset contained in the mlbench package

library(mlbench)
data(PimaIndiansDiabetes)

### Using ELJAlinear to perform EWAS analysis

ELJAglm(var = 'diabetes',data = PimaIndiansDiabetes,
family = binomial(link = "logit"), manplot = TRUE, Bonferroni = TRUE,
FDR = TRUE, nbvalmanplot = 30, manplotsign = FALSE)
results


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