ivw_radial: ivw_radial

Description Usage Arguments Value Author(s) References Examples

View source: R/ivw_radial.R

Description

Fits a radial inverse variance weighted (IVW) 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 "IVW", containing regression estimates, a measure of total heterogeneity using Cochran'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
ivw_radial(r_input, alpha, weights, tol)

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 IVW estimate and Cochran'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).

tol

A value indicating the tolerance threshold for performing the iterative IVW approach. The value represents the minimum difference between the coefficients of the previous and current iterations required for a further iteration to be performed (default= 0.0001).

Value

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

coef

The estimated coefficient, its standard error, t-statistic and corresponding (two-sided) p-value.

qstatistic

Cochran's Q statistic for overall heterogeneity.

df

Degrees of freedom. This is equal to the number of variants -1 when fitting the radial IVW 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 IVW effect estimate.

it.coef

The estimated iterative coefficient, its standard error, t-statistic and corresponding (two-sided) p-value.

it.confint

A vector giving lower and upper confidence limits for the iterative radial IVW effect estimate.

fe.coef

The estimated fixed effect exact coefficient, its standard error, t-statistic and corresponding (two-sided) p-value.

fe.confint

A vector giving lower and upper confidence limits for the fixed effect exact radial IVW effect estimate.

re.coef

The estimated random effect exact coefficient, its standard error, t-statistic and corresponding (two-sided) p-value.

re.confint

A vector giving lower and upper confidence limits for the random effect exact radial IVW effect estimate.

mf

The mean F statistic for the set of genetic variants, indicative of instrument strength.

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
ivw_radial(r_input,0.05,1,0.0001,T)

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