MVmr_cML_DP function

MVMRcML method with Data Perturbation

MVMRcML method with Data Perturbation

This is the internal MVMRcML-DP function of mr_mvcML.

MVmr_cML_DP( b_exp, b_out, se_bx, Sig_inv_l, n, K_vec = as.numeric(c()), random_start = 1L, num_pert = 100L, min_theta_range = -0.5, max_theta_range = 0.5, maxit = 100L, thres = 1e-04 )

Arguments

  • b_exp: A m*L matrix of SNP effects on the exposure variable.
  • b_out: A m*1 matrix of SNP effects on the outcome variable.
  • se_bx: A m*L matrix of standard errors of b_exp.
  • Sig_inv_l: A list of the inverse of m covariance matrices.
  • n: The smallest sample size of the L+1 GWAS dataset.
  • K_vec: Sets of candidate K's, the constraint parameter representing number of invalid IVs.
  • random_start: Number of random start points, default is 1.
  • num_pert: Number of perturbation, default is 100.
  • min_theta_range: The lower bound of the uniform distribution for each initial value for theta generated from.
  • max_theta_range: The upper bound of the uniform distribution for each initial value for theta generated from.
  • maxit: Maximum number of iterations for each optimization, default is 100.
  • thres: Threshold for convergence criterion.

Returns

A list

  • BIC_theta: Estimated causal effect from MVMR-cML-BIC
  • BIC_invalid: Invalid IVs selected by MVMR-cML-BIC
  • BIC_DP_theta: Estimated causal effect from MVMR-cML-DP
  • BIC_DP_se: Estimate standard error for BIC_DP_theta
  • eff_DP_B: Data perturbation with successful convergence
  • DP_ninvalid: A vector of the number of selected invalid IVs by MVMRcML-BIC in each data perturbation.
  • Maintainer: Stephen Burgess
  • License: GPL-2 | GPL-3
  • Last published: 2024-04-12

Useful links