The function takes in a vector of latent genetic values and simulates a trait with controlled heritable variance explained

simTrait(g, h2g)

Arguments

g

vector, latent genetic values

h2g

numeric, heritability of trait

Value

vector of trait