Combine alleles in a mutation matrix
Reduce a mutation matrix by combining a set of alleles into one "lump", if this can be done without distorting the mutation process of the remaining alleles. Such "allele lumping" can give dramatic efficiency improvements in likelihood computations with multi-allelic markers, in cases where only some of the alleles are observed in the pedigree.
lumpedMatrix(mutmat, lump, afreq = attr(mutmat, "afreq"))
mutmat |
A |
lump |
A nonempty subset of the colnames of |
afreq |
A vector with frequency vector, of the same length as the size
of |
A reduced mutation model. If the original matrix has dimensions n*n, the result will be k*k, where k = n - length(lump) + 1.
m = mutationMatrix("eq", alleles = 1:10, rate = 0.1) afreq = rep(1/100, 100) # Suppose only alleles 1 and 2 are observed. # The lumped model is then equivalent to `m`: mLump = lumpedMatrix(m, afreq = afreq, lump = 3:10) mLump
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.