Skip to contents

This function is used to simulate disease parameters. If not predetermined, the function will randomly calculate causal SNPs, MAF values and beta values.

Usage

sim_disease(
  n_snp,
  prevalence,
  h2,
  causal = NULL,
  causal_n = max(1, round(n_snp/10)),
  maf = NULL,
  maf_low = 0.01,
  maf_high = 0.49
)

Arguments

n_snp

Integer specifying amount of SNPs.

prevalence

Number specifying prevalence of disease in the population.

h2

Number specifying heritability parameter.

causal

Vector of predetermined causal SNPs (0 if not causal, 1 if causal). Leave empty to get random causal SNPs.

causal_n

Integer specifying amount of causal SNPs if no causal param given. Default value is 10 procent of total SNPs.

maf

Vector of predetermined Minor Allele Frequencies. Leave empty to get random MAF.

maf_low

Number specifying lower bound for MAF if none given.

maf_high

Number specifying upper bound for MAF if none given.

Value

A list with all the disease parameters.