M <- matrix(c(
NA, 1+5i, 3+11i, NA),
nrow=2,ncol=2,byrow=TRUE)
teams <- LETTERS[seq_len(2)]
dimnames(M) <- list("@home" = teams,"@away"=teams)
dimnames(M) <- list("@home" = teams,"@away"=teams)
M
## @away
## @home A B
## A NA 1+5i
## B 3+11i NA
home_away(M)
## log(A^5 * (A + B + home)^-20 * (A + home) * B^11 * (B + home)^3)
This is a bug. A wins at home once, wins away 11 times, and B wins at home 3 times, and away 5 times. The likelihood function returned by home_away() shows 11 away wins for B.
This is a bug.
A
wins at home once, wins away 11 times, andB
wins at home 3 times, and away 5 times. The likelihood function returned byhome_away()
shows 11 away wins for B.