This function is used to simulate genetic data.
The genetic model of the disease needs to be specified to genetic.model
:
If genetic.model="general"
, there is no link between the GRR associated
to the heterozygous genotype and the GRR associated to the homozygous alternative
genotype. Therefore, the user has to give two matrices of GRR, one for each of these genotypes.
If genetic.model="multiplicative"
, we assume that the GRR associated to the homozygous
alternative genotype is the square of the GRR associated to the heterozygous genotype.
If genetic.model="dominant"
, we assume that the GRR associated to the heterozygous genotype
and the GRR associated to the homozygous alternative genotype are equal.
If genetic.model="recessive"
, we assume that the GRR associated to the heterozygous genotype
is equal to 1: the GRR given is the one associated to the homozygous alternative genotype.
prev
corresponds to the proportion of each sub-group of cases in the population.
It is used only to calculate the MAF in the controls group.
If selected.controls
= T, genotypic frequencies in the control group are computed from genotypic frequencies in the cases groups and the prevalence of the disease.
If FALSE, genotypic frequencies in the control group are computed from allelic frequencies under Hardy-Weinberg equilibrium.
The dataframes Kryukov
or GnomADgenes
available with the package Ravages can be used for the argument genes.maf
.