data(chess)
loglik(c(1/3,1/3),chess)
loglik(rp(14,icons),icons)
if (FALSE) # takes too long
like_series(masterchef_maxp,masterchef)
like_series(indep(equalp(masterchef)),masterchef)
W <- hyper2(pnames=letters[1:6])
W1 <- ggrl(W, 'a', letters[2:5],'f') # 24-element list
W2 <- ggrl(W, c('a','b'), c('c','d'),c('e','f')) # 2^3=8 element list
like_single_list(rep(1/6,5),W1) # information from first observation
like_series(rep(1/6,5),list(W1,W2)) # information from both observations
# hyper3 objects:
H3 <- ordervec2supp3(letters[c(1,2,3,3,2,1,2)])
loglik(c(a=1,b=2,c=3)/6,H3)
loglik(c(a=1,c=3,b=2)/6,H3) # identical
Run the code above in your browser using DataLab