egger_radial: egger_radial

Description Usage Arguments Value Author(s) References Examples

View source: R/egger_radial.R

Description

Fits a radial MR-Egger model using first order, second order, or modified second order weights. Outliers are identified using a significance threshold specified by the user. The function returns an object of class "egger", containing regression estimates, a measure of total heterogeneity using Rucker's Q statistic, the individual contribution to overall heterogeneity of each variant, and a data frame for use in constructing the radial plot.

Usage

1
egger_radial(r_input, alpha, weights, summary)

Arguments

r_input

A formatted data frame using the format_radial function.

alpha

A value specifying the statistical significance threshold for identifying outliers (0.05 specifies a p-value threshold of 0.05).

weights

A value specifying the inverse variance weights used to calculate the MR-Egger estimate and Rucker's Q statistic. By default modified second order weights are used, but one can choose to select first order (1), second order (2) or modified second order weights (3).

summary

Indicates whether a summary of the radial MR-Egger model should be printed (default= TRUE) or withheld (FALSE).

Value

An object of class "egger" containing the following components:

coef

A matrix giving the intercept and slope coefficient, corresponding standard errors, t-statistics, and (two-sided) p-values.

qstatistic

Rucker's Q statistic for overall heterogeneity.

df

Degrees of freedom. This is equal to the number of variants -2 when fitting the radial MR-Egger model.

outliers

A data frame containing variants identified as outliers, with respective Q statistics, chi-squared tests and SNP identification.

data

A data frame containing containing SNP IDs, inverse variance weights, the product of the inverse variance weight and ratio estimate for each variant, contribution to overall heterogeneity with corresponding p-value, and a factor indicator showing outlier status.

confint

A vector giving lower and upper confidence limits for the radial MR-Egger effect estimate.

Author(s)

Wes Spiller; Jack Bowden.

References

Bowden, J., et al., Improving the visualization, interpretation and analysis of two-sample summary data Mendelian randomization via the Radial plot and Radial regression. International Journal of Epidemiology, 2018. 47(4): p. 1264-1278.

Examples

1
egger_radial(r_input,0.05,1)

WSpiller/MRPracticals documentation built on April 25, 2020, 10:52 a.m.