Modification to standard weighted median MR Updated based on Burgess 2016 "Robust instrumental variable methods using multiple candidate instruments with application to Mendelian randomization"

mr_penalised_weighted_median(
b_exp,
b_out,
se_exp,
se_out,
parameters = default_parameters()
)

Arguments

b_exp Vector of genetic effects on exposure Vector of genetic effects on outcome Standard errors of genetic effects on exposure Standard errors of genetic effects on outcome List containing penk - Constant term in penalisation, and nboot - number of bootstrap replications to calculate SE. default_parameters() sets parameters=list(penk=20, nboot=1000).

Value

List with the following elements:

b

MR estimate

se

Standard error

pval

p-value