Explore breeding values, phenotypes, and variance components

These exercises aim to improve your understanding of breeding value, phenotype, variance components, and heritability.

1. Generate breeding values, errors, and phenotypes

For each, use rnorm() to sample 2000 values from a normal distribution with default mean and standard deviation.

bv<- rnorm(2000) #breeding value
err<- rnorm(2000) #error
pheno<- bv+err #phenotype

2. Compute the correlation between the breeding values and the phenotypes

The correlation between breeding values and phenotypes is the selection accuracy. It tells us how much does a change in phenotype in standard deviation units affect a change in breeding value in standard deviation units

3. Compute the additive genetic and phenotypic variances

The additive genetic variance is the variance of the breeding values. The phenotypic variance is the variance of the phenotypes, the error variance is the variance of the residual errors

4. Compute the covarinace between phenotype and breeding value

Covariance between phenotype and breeding value should be equal to the additive genetic variance because there is no residual covariance between phenotype and breeding value

5. Compute h^2 using variance components

Heritability (h^2) is the additive genetic variance divided by the total phenotypic variance