mr_allmethods function

Mendelian randomization estimation using all methods

Mendelian randomization estimation using all methods

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). methods

mr_allmethods(object, method = "all", ...) ## S4 method for signature '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.

Returns

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.

Examples

mr_allmethods(mr_input(bx = ldlc, bxse = ldlcse, by = chdlodds, byse = chdloddsse), method="main", iterations = 100) # iterations is set to 100 to reduce runtime for the mr_median method, # at least 10000 iterations are recommended in practice

References

See mr_median, mr_egger, and mr_ivw.

  • Maintainer: Stephen Burgess
  • License: GPL-2 | GPL-3
  • Last published: 2024-04-12

Useful links