Skip to contents

The function mr_allmethods implements Mendelian randomization analyses using summarized data to calculate estimates (as well as standard errors and confidence interval limits) for all the methods included in the package (or alternatively for the group of methods chosen).

Usage

mr_allmethods(object, method = "all", ...)

# S4 method for MRInput
mr_allmethods(object, method = "all", ...)

Arguments

object

An MRInput object.

method

Which estimation method should be included in the calculation. By default, all estimates are computed ("all"), but one can choose to show only the results of median-based, inverse-variance weighted, or MR-Egger methods separately through specifying "median", "ivw", "egger", or "main" (gives main results only, that is simple and weighted median, IVW, and MR-Egger).

...

Additional arguments to be passed to other methods.

Value

An object of type MRAll with the following slots :

Data

The MRInput object used to calculate the various values.

Values

A data.frame containing the various estimates.

Method

The choice of methods estimated (default is "all").

Details

See mr_median, mr_egger, and mr_ivw for details of how each of the methods is implemented.

References

See mr_median, mr_egger, and mr_ivw.

Examples

mr_allmethods(mr_input(bx = ldlc, bxse = ldlcse,
  by = chdlodds, byse = chdloddsse), method="main", iterations = 100)
#>           Method Estimate Std Error 95% CI        P-value
#>    Simple median    1.755     0.751   0.282 3.228   0.020
#>  Weighted median    2.683     0.429   1.841 3.524   0.000
#>              IVW    2.834     0.530   1.796 3.873   0.000
#>         MR-Egger    3.253     0.770   1.743 4.762   0.000
#>      (intercept)   -0.011     0.015  -0.041 0.018   0.451
  # iterations is set to 100 to reduce runtime for the mr_median method,
  # at least 10000 iterations are recommended in practice