penalised.weights function

Calculates p-values for penalization of weights

Calculates p-values for penalization of weights

Internal function for calculating penalized weights in conjunction with r.weights.

These weights are used in either the mr_ivw or mr_egger functions when penalized = TRUE, or in the mr_median function when method = "penalized".

penalised.weights(.Bx, .Bxse, .By, .Byse)

Arguments

  • .Bx: Beta-coefficient for genetic association with the risk factor.
  • .Bxse: Standard error of genetic association with the risk factor.
  • .By: Beta-coefficient for genetic association with the outcome.
  • .Byse: Standard error of genetic association with the outcome.

Returns

P-values corresponding to heterogeneity test for each genetic variant in turn (based on a chi-squared-1 distribution).

Details

None.

Examples

penalised.weights(ldlc, ldlcse, chdlodds, chdloddsse)
  • Maintainer: Stephen Burgess
  • License: GPL-2 | GPL-3
  • Last published: 2024-04-12

Useful links