View source: R/mr_fun_general.R
grappleRobustEst | R Documentation |
The main function of GRAPPLE to estimate causal effects of risk factors beta
under a random effect model of the pleiotropic effects.
grappleRobustEst(
data,
p.thres = NULL,
cor.mat = NULL,
tau2 = NULL,
loss.function = c("tukey", "huber", "l2"),
k = switch(loss.function[1], l2 = NA, huber = 1.345, tukey = 4.685),
niter = 20,
tol = .Machine$double.eps^0.5,
opt.method = "L-BFGS-B",
diagnosis = T,
plot.it = T
)
data |
A data frame containing the information of the selected genetic instruments.
One can simply take the |
p.thres |
The p-value threshold for SNP selection. The SNPs whose |
cor.mat |
Either NULL or a |
tau2 |
The dispersion parameter. The default value is NULL, which is to be estimated by the function |
loss.function |
Loss function used, one of "tukey", "huber" or "l2". Default is "tukey", which is robust to outlier SNPs with large pleiotropic effects |
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 |
niter |
Number of maximum iterations allowed 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 |
opt.method |
the optimization used, which is one of choices the R function |
diagnosis |
Run diagnosis analysis based on the residuals or not, default is FALSE |
plot.it |
Whether show the QQ-plot or not if diagnosis if performed. Default is TRUE. |
A list with elements
beta.hat |
Point estimates of |
tau2.hat |
Point estimates of the pleiotropic effect variance |
beta.variance |
Estimated covariance matrix of |
tau2.se |
Estimated standard deviation of |
beta.p.vaue |
A vector of p-values where the kth element is the p-value for whether |
std.resid |
Returned if |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.