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 = T, priority = "Cardiometabolic" )
Convert effects to OR? The default is
Which of the single SNP methods to use when only 1 SNP was used to estimate the causal effect? The default is
Which of the multi-SNP methods to use when there was more than 1 SNPs used to estimate the causal effect? The default is
Logical; retrieve sample size and subcategory using
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.
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).