Function to create additive and dominance genomic relationship matrices from biallelic dosages.

kinship(M, type)

Arguments

M

dosage matrix. Assumes SNPs in M coded 0, 1, 2 (requires rounding dosages to integers). M is Nind x Mrow, numeric matrix, with row/columanes to indicate SNP/ind ID.

Value

square symmetric genomic relationship matrix