Description Usage Arguments Value Examples
Uses a resampling procedure to estimate a P-value for a MR-MtRobin object.
1 2 | MR_MtRobin_resample(MR_MtRobin_res, nsamp = 10000,
use_nonconverge = FALSE)
|
MR_MtRobin_res |
a list object returned by |
nsamp |
integer of the number of samples to use in estimating P-value using a null distribution. |
use_nonconverge |
logical of whether to use samples resulting in non-convergence of random slope |
A list of two elements:
pvalue | numeric of the estimated P-value. |
nsamp_used | integer of the number of samples used in estimating the P-value. |
nsamp_used
is returned because not all nsamp
may be used if
use_nonconverge=FALSE
(samples will be dropped if the model does not
converge or results in a singular fit of the random slope).
1 2 3 | myRes <- MR_MtRobin(snpID,gwas_betas,gwas_se,eqtl_betas,eqtl_se,eqtl_pvals,LD)
MR_MtRobin_resample(MR_MtRobin_res=myRes, nsamp=1e4, use_nonconverge=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.