plot.egger {GLIDE}R Documentation

A function used to draw Egger plot

Description

It is used to draw MR-Egger regression plot.

Usage

## S3 method for class 'egger'
plot(x,exposure_coeff,qcutoff=0.2,xlab="Genetic association with the exposure",
                       ylab="Genetic association with the outcome",...)

Arguments

x

x is a dataframe, it is the outcome of the glide function.

exposure_coeff

A named numeric vector or a one-column dataframe for the external regression coefficients for genotype-exposure associations. These coefficients are typically derived from previous genome-wide association studies. All the names or rownames must be found in "genotype_columns" (specified below) columns of the input data.

qcutoff

qcutoff is the q-value cutoff.

xlab

xlab is the default x label.

ylab

ylab is the default y label.

...

the rest of plot arguments.

Value

No return value, the Egger plot will be generated.

Author(s)

James Y. Dai and X. Wang

Examples


##first generate output using the glide function
#load an example data
data(simdata)
simdat=simdata$simdat
coeff=simdata$coeff

formula=as.formula("outcome~age+sex+pc1+pc2+pc3")
genotype_columns=which(grepl("^SNP",colnames(simdat)))

#run glide
out=glide(formula=formula,exposure_coeff=coeff,genotype_columns,data=simdat,np=100000,
qcutoff=0.2,parallel=TRUE,corenumber=1,verbose=TRUE)

##draw the Egger plot
plot.egger(out,exposure_coeff=coeff)


[Package GLIDE version 1.0.5 Index]