LRpair {BookEKM} | R Documentation |
SNP markers are assumed. Pairwise relationships are compared. The distribution of LR is computed along with mean and sd, also on log scale.
LRpair(p1 = c(0.5, 0.5), p2== c(0.5, 0.5), rho = 0.29, ped = NULL, H1 = NULL, H2 = NULL)
p1 |
a numerical vector with allele frequencies for first marker. |
p2 |
a numerical vector with allele frequencies for second marker. |
rho |
a number in the interval [0,0.5]. Recombination rate |
ped |
linkdat object |
H1 |
Two integer giving numerator hypothesis of LR |
H2 |
Two integers giving pair denominator hypothesis of LR |
table.unique |
Unique LR-s and probabilities |
table.all |
Complete table for all combinations |
moments |
Summary statistics |
Thore Egeland
require(paramlink) ped <- nuclearPed( 2, sex = c(1, 2)) res <- LRpair(rho = 0.0, ped = ped, H1 = c( 1, 3), H2 = c(1,2)) stopifnot(res$moments[1,1]==(5/4)^2) ## Not run: ped <- nuclearPed(2, sex = c(1, 2)) ped <- addOffspring(ped, mother = 4, noffs = 1) ped <- addOffspring(ped, father = 5, noffs = 1) res <- LRpair(rho = 0.0, ped = ped, H1 = c(6, 1), H2 = c(6, 7)) stopifnot(res$moments[1,1] == 73/64) ## End(Not run) # ped <- nuclearPed( 2, sex = c(1, 2)) R=0.5 res <- LRpair(p1 = c( 0.5, 0.5), p2 = c( 0.5, 0.5), rho = R, ped = ped, H1 = c( 3,4), H2 = c(1,2)) LR1 = res$moments[1,1] L1=L2=2 d1 = (2*L1^2+L1*L2+13*L1+2*L2^2+13*L2+33)/64 d2 = (L1-1)*(L2-1)*(4*R+2*(L1+L2+2)*R^2+L1*L2*R^4)/64 LR2 = d1+d2 #LR formula LR1==LR2