grappleRobustEst: Robust multivariate MR estimation

Description Usage Arguments

View source: R/mr_fun_general.R

Description

Robust multivariate MR estimation

Usage

1
2
3
4
5
grappleRobustEst(b_exp, b_out, se_exp, se_out, tau2 = NULL,
  cor.mat = NULL, loss.function = c("l2", "huber", "tukey"),
  k = switch(loss.function[1], l2 = NA, huber = 1.345, tukey = 4.685),
  suppress.warning = FALSE, diagnosis = FALSE, niter = 20,
  tol = .Machine$double.eps^0.5, opt.method = "L-BFGS-B")

Arguments

b_exp

A matrix of size p * k for the effect sizes of p number of independent SNPs on k risk factors

b_out

A vector of length p for the effect sizes of the p SNPs on the outcome

se_exp

A matrix of size p * k for the standard deviations of the effect sizes in b_exp

se_out

A vector of length p for the standard deviations of the effect sizes in b_out

tau2

The dispersion parameter, by default to be estimated from the function

cor.mat

Either NULL or a k + 1 by k + 1 symmetric matrix. The correlation matrix of estimated effect sizes on the k risk factors and the outcome. Default is NULL, for the identity matrix

loss.function

Loss function used, one of "l2", "huber" and "tukey"

k

Tuning parameters of the loss function, for loss "l2", it is NA, for loss "huber", default is 1.345 and for loss "tukey", default is 4.685

suppress.warning

Whether suppress warning messages or not, default is FALSE

diagnosis

Run diagnosis analysis based on the residuals or not, default is FALSE

niter

Number of iterations for optimization. Default is 20

tol

Tolerance for convergence, default is the square root of the smallest positive floating number depending on the machine R is running on


jingshuw/GRAPPLE-beta- documentation built on Sept. 18, 2019, 5:07 a.m.