sim.cross.pheno: Generate Random Phenotype with Given Heritability

Description Usage Arguments Details Value Examples

Description

Generate Random Phenotype with Given Heritability

Usage

1
sim.cross.pheno(h2, geno, background = "GRM", ...)

Arguments

h2

heritability

geno

"genotype.probs" object

background

method to generate genetic background, see Details

...

parameters passed to genrel.matrix

Details

Currently two polygenic backgrounds are supported: If background = "GRM" then the genetic effect is generated from a multivariate normal distribution with genetic similarity matrix as variance matrix. If background = "all-snps" then genetic effect is a sum of small gaussian distributed effect at every SNP location.

Value

matrix with phenotype data

Examples

1
2
3
4
cross <- sim.cross.geno(250, nmar=10)
cross$pheno <- sim.cross.pheno(0.5, cross)
cross$pheno <- sim.cross.pheno(0.5, cross, method = "kinship")
cross$pheno <- sim.cross.pheno(0.5, cross, background = "all-snps")

simecek/HPQTL documentation built on May 29, 2019, 10 p.m.