This function generates simulated genotype and phenotype data for all eight GxT model categories.
A named, ordered integer vector specifying the numbers of simulations in the eight model categories.
A data frame containing sample IDs (character strings or integers), subject IDs (character strings or integers), and treatment conditions (0 or 1). The columns must be named as "sample", "subject", and "condition".
A character string specifying the function. This must be one of "nonlinear" and "linear", corresponding to nonlinear and linear models, respectively.
A data frame containing the subject IDs (character strings or integers) and the genotype coded as (0, 1, 2) or the imputation-based allelic dosage in the first and second columns, respectively. The columns must be named as "subject" and "g".
A scalar specifying the lower bound of MAF.
A scalar specifying the upper bound of MAF.
A logical scalar as to whether to ensure that homozygotes for both alleles have at least one observation in both control and treated conditions.
A numeric vector of length three specifying the standard
deviations of the genotype, treatment, and interaction effects,
respectively. For each effect, exactly one of the corresponding
elements of sd and coef must be non-NA.
A numeric vector of length three specifying fixed values
for the genotype, treatment, and interaction effects, respectively.
For each effect, exactly one of the corresponding elements of
sd and coef must be non-NA.
A scalar specifying the intercept.
A scalar specifying the residual error standard deviation.
A logical scalar as to whether to include random effect.
A scalar specifying the random intercept standard
deviation. If ranef is TRUE, this is set to 1
by default.
A matrix containing pairwise genetic relatedness
between subjects. The row and column names must match the set of
unique elements of the "subject" column in "anno" in the
corresponding order (i.e., unique(anno$subject)). This is
set to NULL by default, in which case the identity matrix is
used.
An integer specifying a seed for RNG.
A character string specifying the output format. This must be one of "list" and "data.frame".
A list of lists containing:
y - A vector of phenotypes.
g - A vector of genotypes.
t - A vector of treatment indicators.
sample - A vector of sequencing sample IDs.
subject - A vector of subject IDs.
index - An integer specifying one of the eight
models.
maf - A scalar specifying the minor allele frequency
used for generating the genotype data.
beta - A named numeric vector specifying the true
coefficient values used for generating the phenotype data. The
"b0" element represents the intercept. The "b1", "b2", and "b3"
elements respectively represent the genotype, treatment, and
interaction effect sizes.
or a list containing: