transform_results: Transform result of iterations of simulation and MR

Description Usage Arguments Value

View source: R/postprocessing.R

Description

Transforms results of x iterations with each n scenario simulations into median per scenario for relevant variables. For examples see vignette browseVignettes('MRTool')

Usage

1
transform_results(results, SNP, iterations, pve_grid, rev = FALSE)

Arguments

results

list of results of single iteration. result of single iteration is list(reg_res,sim_data,mr_res)

SNP

names of snps used

iterations

integer how many times the simulation was repeated

pve_grid

grid of percentages of variance explained as output of cal_betas

rev

true if mr was executed in the anticausal direction. false for causal direction

Value

list(res_list,sim_data). res_list is list of regression results and mr results. sim_data is result of simulation


askieslinger/MRTool documentation built on April 29, 2020, 12:02 p.m.