Population structure


We will estimate population structure in the beef cattle data.

Load R objects

Use the function load() to load the results from genomic BLUP day20.Rda we created in class.

load(file.choose())  # day20.Rda

Calculate eigenvectors and eigenvalues

We will use the function eigen to perform an eigen decomposition of the \(\mathbf{G}\) matrix.

ed <- eigen(G)

# eigen values

# eigen vectors

PC1 vs. PC2

plot(ed$vectors[, 2], ed$vectors[, 1])

PC1 vs. PC3

plot(ed$vectors[, 3], ed$vectors[, 1])

PC2 vs. PC3

plot(ed$vectors[, 3], ed$vectors[, 2])

Gota Morota

April 27, 2017