Sample the latent state of ancenstry indicators for a haplotype given its two ancestral haplotypes.
sample_ancestry_(x, p1, p2, d, p, lambda, epsilon)
x | 0-1 vector of length p giving the offspring haplotypes |
---|---|
p1 | 0-1 vector of length p giving one parental haplotype |
p2 | 0-1 vector of length p giving the other parental haplotype |
d | numberic vector of length p - 1 giving the distance between each site |
p | length of the vector x |
lambda | the recombination rate, a multiplier for the distance d |
epsilon | the pointwise mutation rate |
a vector of of the ancestral states