This function generates synthetic from the fixed effects model described in the experimental studies portion of the paper.

makeSimData(
  H,
  n,
  L = 100,
  maf = 0.01,
  gamma0 = 1,
  gammaX = 1,
  gammaE = 1,
  gammaG,
  gammaGE,
  causal = 40,
  seed = 12345
)

Arguments

H

Matrix of haplotype data (e.g. cosihap)

n

Number of individuals

L

Number of SNPs in the G matrix (Default is 100), should be a value between 1 and 604

maf

Minor allele frequency (Default is 0.01)

gamma0

gamma0 Fixed effect coefficient for intercept (Default is 1)

gammaX

gammaX Fixed effect coefficient for confounding covariates (Default is 1)

gammaE

gammaE Fixed effect coefficient for E effect (Default is 1)

gammaG

gammaG Fixed effect coefficient for G main effect

gammaGE

gammaGE Fixed effect coefficient for GxE interaction effect

causal

Number of causal SNPs (default is 40)

seed

Seed (Default is 12345)

Value

Synthetic dataset containing y, X, E, G, epsilon, and number of causal SNPs

Examples

dat <- makeSimData(H=cosihap, n=500, L=10, gammaG=1, gammaGE=0, causal=4, seed=1)