tryx.simulate.Rd
# Create data using model here: https://www.draw.io/#G1VqjTd4iH2de7sXI4PhUrxazBnYLduH_w. Create summary data for all necessary traits, then perform tryx scan x = exposure y = outcome u1 = confounder of x and y u2 = mediator of horizontal pleiotropy from gx to y. One for each gx u3 = mediator between x and y
tryx.simulate( nid = 10000, ngx = 30, ngu1 = 30, ngu2 = 30, nu2 = 2, ngu3 = 30, vgx = 0.2, vgu1 = 0.6, vgu2 = 0.2, vgu3 = 0.2, bxy = 0, bu1x = 0.6, bu1y = 0.4, bxu3 = 0.3, bu3y = 0, vgxu2 = 0.2, vu2y = 0.2, ngxu3 = 0, vgxu3 = 0, mininum_instruments = 10, instrument_threshold = "bonferroni", outlier_threshold = "bonferroni", outliers_known = "detected", directional_bias = FALSE )
nid | = 10000 Number of samples |
---|---|
ngx | = 30 Number of direct instruments to x |
ngu1 | = 30 Number of instruments influencing confounder of x and y |
ngu2 | = 30 Number of instruments per mediating |
nu2 | = 2 Number of gx that are pleiotropic |
ngu3 | = 30 Number of instruments for u3 mediator |
vgx | = 0.2 Variance explained by gx instruments |
vgu1 | = 0.6 Variance explained by u1 instruments |
vgu2 | = 0.2 Variance explained by u2 instruments |
vgu3 | = 0.2 Variance explained by u3 instruments |
bxy | = 0 Causal effect of x on y |
bu1x | = 0.6 Effect of u1 on x |
bu1y | = 0.4 Effect of u1 on y |
bxu3 | = 0.3 Effect of x on u3 |
bu3y | = 0 Effect of u3 on y |
vgxu2 | = 0.2 Variance explained by each gx instrument on each u2 mediator |
vu2y | = 0.2 Variance explained by all u2 mediators on y |
ngxu3 | = 0 Number of gx instruments that pleiotropically associate with u3 mediator |
mininum_instruments | = 10 Minimum number of instruments required to have been detected to run simulation |
instrument_threshold | = "bonferroni" Threshold, either numeric or 'bonferroni' |
outlier_threshold | = "bonferroni" Threshold, either numeric or 'bonferroni' |
outliers_known | = "detected" Either detected = using radial mr to find heterogeneity outliers; known = adjust for all known invalid instruments; all = adjust for all instruments |
directional_bias | = FALSE Is the pleiotropic effect randomly centered around 0 (FALSE) or does it have a non-0 mean (TRUE) |
vgxu3y | = 0 Variance explained by all gx variants directly on u3 mediator |
list for tryx.analyse