format_mr_results | R Documentation |
This function takes the results from mr()
and is particularly useful
if the MR has been applied using multiple exposures and multiple outcomes.
It creates a new data frame with the following:
Variables: exposure, outcome, category, outcome sample size, effect, upper ci, lower ci, pval, nsnp
only one estimate for each exposure-outcome
exponentiated effects if required
format_mr_results(
mr_res,
exponentiate = FALSE,
single_snp_method = "Wald ratio",
multi_snp_method = "Inverse variance weighted",
ao_slc = TRUE,
priority = "Cardiometabolic"
)
mr_res |
Results from |
exponentiate |
Convert effects to OR? The default is |
single_snp_method |
Which of the single SNP methods to use when only 1 SNP was used to estimate the causal effect? The default is |
multi_snp_method |
Which of the multi-SNP methods to use when there was more than 1 SNPs used to estimate the causal effect? The default is |
ao_slc |
Logical; retrieve sample size and subcategory using |
priority |
Name of category to prioritise at the top of the forest plot. The default is |
By default it uses the available_outcomes()
function to retrieve the study level characteristics for the outcome trait,
including sample size and outcome category.
This assumes the MR analysis was performed using outcome GWAS(s) contained in MR-Base.
If ao_slc
is set to TRUE
then the user must supply their own study level characteristics.
This is useful when the user has supplied their own outcome GWAS results (i.e. they are not in MR-Base).
data frame.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.