n.iter <- 10
delta <- 0.1
covariance.matrix <- list()
covariance.matrix$mean <- c(0, 0, 0)
covariance.matrix$decomp <- diag(3)
covariance.matrix$inv <- diag(3)
men.comparisons <- data.frame("winner" = c(1, 3, 2, 2), "loser" = c(3, 1, 1, 3))
women.comparisons <- data.frame("winner" = c(1, 2, 1, 2), "loser" = c(3, 1, 3, 3))
men.win.matrix <- comparisons_to_matrix(3, men.comparisons) #win matrix for the male judges
women.win.matrix <- comparisons_to_matrix(3, women.comparisons) #win matrix for the female judges
f.initial <- c(0, 0, 0) #initial estimate for grand mean
g.initial <- c(0, 0, 0) #initial estimate for differences
mcmc.output <- run_symmetric_mcmc(n.iter, delta, covariance.matrix, men.win.matrix,
women.win.matrix, f.initial, g.initial)
Run the code above in your browser using DataLab