View source: R/mr_fun_general.R

Robust multivariate MR estimation

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")
``` |

`b_exp` |
A matrix of size |

`b_out` |
A vector of length |

`se_exp` |
A matrix of size |

`se_out` |
A vector of length |

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

`cor.mat` |
Either NULL or a |

`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.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.