create_system: Wrapper for simulation pipeline

View source: R/mr_system.r

create_systemR Documentation

Wrapper for simulation pipeline

Description

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

Usage

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
)

Arguments

nidx

number of individuals for x

nidy

number of individuals for y

nidu

Default=0 If 0 then don't simulate separate populations for the u variables

nu

Default=0 Number of confounders influencing x and y

na

Default=0 Number of traits upstream of x

nb

Default=0 Number of traits upstream of y

var_x.y

var in y explained by x

nsnp_x

nsnp influencing x

var_gx.x

variance in x explained by instruments for x

var_gx.y

Default=0

mu_gx.y

Default=0

prop_gx.y

Default=1

nsnp_y

Default=0

var_gy.y

Default=0

var_gy.x

Default=0

mu_gy.x

Default=0

prop_gy.x

Default=1

Value

List of effects across system


explodecomputer/simulateGP documentation built on April 3, 2024, 2:38 a.m.