run_sim: Helper function to create a dataset and compare the results...

View source: R/simulate.R

run_simR Documentation

Helper function to create a dataset and compare the results of many methods.

Description

Helper function to create a dataset and compare the results of many methods.

Usage

run_sim(
  name,
  iter,
  Na,
  Nb,
  M,
  ha,
  hb,
  hu,
  nu,
  eta,
  gamma,
  delta,
  p,
  q,
  r,
  s,
  af_ref_file = NULL
)

Arguments

name

A name for this simulation setup.

iter

The current iteration.

Na

Number of samples in each study of phenotype A.

Nb

Number of samples in each study of phenotype B.

M

Total number of SNPs to simulate, including null SNPs.

ha

Heritability of phenotype A.

hb

Heritability of phenotype B.

hu

Heritability of phenotype U.

nu

Causal effect of U on A.

eta

Causal effect of U on B.

gamma

Causal effect of A on B.

delta

Causal effect of B on A.

p

Proportion of non-null SNPs.

q

Proportion of non-null SNPs effecting U.

r

Proportion of non-null SNPs effecting A.

s

Proportion of non-null SNPs effecting B.

af_ref_file

String giving the location of a gzipped tsv with a column called 'MAF', giving a list of reference allele frequencies to use in simulation. Usually just an HM3 LD-score file for a particular chromosome.


brielin/WWER documentation built on May 22, 2022, 7:28 p.m.