Based on the parameters specified this function will call init_parameters
, add_u
, sample_system_effects
, simulate_population
and estimate_system_effects
. A separate population is generated for each phenotype (x, y and each of u) to allow 2SMR and PRS analyses
create_system(
nidx,
nidy,
nidu = 0,
nu = 0,
na = 0,
nb = 0,
var_x.y,
nsnp_x,
var_gx.x,
var_gx.y = 0,
mu_gx.y = 0,
prop_gx.y = 1,
nsnp_y = 0,
var_gy.y = 0,
var_gy.x = 0,
mu_gy.x = 0,
prop_gy.x = 1
)
number of individuals for x
number of individuals for y
Default=0 If 0 then don't simulate separate populations for the u variables
Default=0 Number of confounders influencing x and y
Default=0 Number of traits upstream of x
Default=0 Number of traits upstream of y
var in y explained by x
nsnp influencing x
variance in x explained by instruments for x
Default=0
Default=0
Default=1
Default=0
Default=0
Default=0
Default=0
Default=1
List of effects across system