Skip to contents

Combines per-variant ratio estimates of a causal effect into a single inverse-variance weighted estimate under one of three meta-analysis models, using either first- or second-order delta-method weights on the ratio variance (Burgess & Bowden 2015).

Usage

morie_mtr2sx(
  beta_x,
  se_x,
  beta_y,
  se_y,
  model = "multiplicative",
  weights = "first_order",
  theta = 0
)

Arguments

beta_x

Numeric vector of variant–exposure associations.

se_x

Numeric vector of standard errors of beta_x.

beta_y

Numeric vector of variant–outcome associations.

se_y

Numeric vector of standard errors of beta_y.

model

One of "multiplicative" (default), "fixed" or "additive".

weights

One of "first_order" (default) or "second_order".

theta

Correlation between the two association estimates, used only when weights = "second_order"; zero in a genuine two-sample design.

Value

A named list with elements estimate, se, z, p_value, ci (length-2 numeric), ratio_estimates, variances, weights_used, model, phi_multiplicative, tau2, Q, df, I2, se_fixed, regression_estimate, regression_se_fixed, n_variants and method.

References

Burgess, S. & Bowden, J. (2015). Integrating summarized data from multiple genetic variants in Mendelian randomization. arXiv:1512.04486 [stat.AP].

Examples

morie_mtr2sx(beta_x = c(1, 2, 3, 4, 5, 6, 7, 8), se_x = c(1, 2, 3, 4, 5, 6, 7, 8),
  beta_y = c(1, 2, 3, 4, 5, 6, 7, 8), se_y = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] 1
#> 
#> $se
#> [1] 0.3535534
#> 
#> $z
#> [1] 2.828427
#> 
#> $p_value
#> [1] 0.004677735
#> 
#> $ci
#> [1] 0.3070354 1.6929646
#> 
#> $ratio_estimates
#> [1] 1 1 1 1 1 1 1 1
#> 
#> $variances
#> [1] 1 1 1 1 1 1 1 1
#> 
#> $weights_used
#> [1] "first_order"
#> 
#> $model
#> [1] "multiplicative"
#> 
#> $phi_multiplicative
#> [1] 1
#> 
#> $tau2
#> [1] 0
#> 
#> $Q
#> [1] 0
#> 
#> $df
#> [1] 7
#> 
#> $I2
#> [1] 0
#> 
#> $se_fixed
#> [1] 0.3535534
#> 
#> $regression_estimate
#> [1] 1
#> 
#> $regression_se_fixed
#> [1] 0.3535534
#> 
#> $n_variants
#> [1] 8
#> 
#> $method
#> [1] "inverse-variance weighted MR (multiplicative model, first_order weights); Burgess & Bowden (2015) Sec. 2"
#>