Title: | Multivariable Mendelian randomization based on constrained maximum likelihood |
---|---|
Description: | Robust multivariable Mendelian randomization based on constrained maximum likelihood. |
Authors: | Zhaotong Lin |
Maintainer: | Zhaotong Lin <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2025-01-01 05:36:48 UTC |
Source: | https://github.com/ZhaotongL/MVMR-cML |
MVMR-cML-DP
Generate the list of inverse of covariance matrices used in MVMR-cML-DP
invcov_mvmr(se_bx, se_by, rho_mat)
invcov_mvmr(se_bx, se_by, rho_mat)
se_bx |
A m*L matrix of standard errors of SNP-exposure association |
se_by |
A vector of standard errors of SNP-outcome association |
rho_mat |
A (L+1) |
A list of inverse of covariance matrices with respect to each genetic variant, retaining the ordering in se_bx
This is based on the profile likelihood of the set of valid IVs, which is not robust to uncertainty in model selection.
MVcML_SdTheta(b_exp, b_out, Sig_inv_l, theta, zero_ind, r_vec = NULL)
MVcML_SdTheta(b_exp, b_out, Sig_inv_l, theta, zero_ind, r_vec = NULL)
b_exp |
A matrix of SNP effects on the exposure variable. |
b_out |
A vector of SNP effects on the outcome variable. |
Sig_inv_l |
A list of inverse of covariance matrix. |
theta |
A vector of final estimates of causal effect of each exposure by MVMR-cML-BIC obtained from |
zero_ind |
A vector of the index of valid IVs. |
r_vec |
A vector of estimated horizontal pleiotropic effects. |
A vector
This is the main function of MVMR-cML.
MVmr_cML( b_exp, b_out, se_bx, Sig_inv_l, n, K_vec = as.numeric(c()), random_start = 1L, maxit = 100L, thres = 1e-04 )
MVmr_cML( b_exp, b_out, se_bx, Sig_inv_l, n, K_vec = as.numeric(c()), random_start = 1L, maxit = 100L, thres = 1e-04 )
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 |
Sig_inv_l |
A list of the inverse of m covariance matrices, generated by |
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. |
maxit |
Maximum number of iterations for each optimization, default is 100. |
thres |
Threshold for convergence criterion. |
A list
Estimated causal effect from MVMR-cML-BIC
Invalid IVs selected by MVMR-cML-BIC
K_vec to be searched from
0 if converge; 1 otherwise
BIC vector corresponding to K_vec
This is the main function of MVMR-cML.
MVmr_cML_DP( b_exp, b_out, se_bx, Sig_inv_l, n, K_vec = as.numeric(c()), random_start = 1L, num_pert = 100L, maxit = 100L, thres = 1e-04 )
MVmr_cML_DP( b_exp, b_out, se_bx, Sig_inv_l, n, K_vec = as.numeric(c()), random_start = 1L, num_pert = 100L, maxit = 100L, thres = 1e-04 )
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 |
Sig_inv_l |
A list of the inverse of m covariance matrices, generated by |
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. |
maxit |
Maximum number of iterations for each optimization, default is 100. |
thres |
Threshold for convergence criterion. |
A list
Estimated causal effect from MVMR-cML-BIC
Invalid IVs selected by MVMR-cML-BIC
Estimated causal effect from MVMR-cML-DP
Estimate standard error for BIC_DP_theta
Data perturbation with successful convergence