powered by
dmm(perm, sigma0 = identity.permutation(length(perm)), theta, dist.name = "kendall")
sample <- matrix(c(1,2,3, 4,1,4,3,2,1,2,4,3), nrow = 3, ncol = 4, byrow = TRUE) sig<-c(1,2,3,4) log.prob <- apply(sample,MARGIN=1,FUN=function(x){log(dmm(x,sig, 1,'cayley'))}) sum(log.prob)
Run the code above in your browser using DataLab