Draws biallelic marker genotypes, forms the genomic relationship matrix of
VanRaden (2008), and simulates a trait with the requested heritability, so
that reml_sketch() can be checked against known variance components.
Arguments
- n
Number of individuals.
- p
Number of markers.
- h2
Heritability, between 0 and 1.
- pops
Number of subpopulations.
- fst
Fixation index between subpopulations, used when
pops > 1.- form_G
Return the relationship matrix itself. Set to
FALSEfor largenand passgrm_matrix(M)to the fitting functions instead.
Value
A list with the phenotype y, an intercept design matrix X, the
genotype matrix M, the relationship matrix G (when form_G = TRUE),
the subpopulation of each individual pop, and the true h2.
Details
With pops > 1 the individuals come from that many subpopulations whose
allele frequencies have drifted apart under the Balding-Nichols model with
fixation index fst. Population structure gives the relationship matrix a
few large eigenvalues, as real breeding and human cohorts do, and those are
exactly what a low-rank preconditioner captures.
Genetic values are sums of marker effects on the centred genotypes, with
variance chosen so that the genetic and residual variance components on the
scale of the relationship matrix are h2 and 1 - h2.
The function draws random numbers but does not set the seed; call
base::set.seed() first for a reproducible data set.
References
VanRaden, P. M. (2008) Efficient methods to compute genomic predictions. Journal of Dairy Science 91, 4414-4423. doi:10.3168/jds.2007-0980
Balding, D. J. & Nichols, R. A. (1995) A method for quantifying differentiation between populations at multi-allelic loci and its implications for investigating identity and paternity. Genetica 96, 3-12. doi:10.1007/bf01441146
