powered by
Calculate multinomial probabilities
calc_multinom_probs(sar, logt, logc, d, n, nt)
A vector of probabilities
The unrolled matrix containing the portion of the sample space to sum over
The vector of candidate theta values, as sampled from the null space
The vector of log multinomial coefficients see log_multinom_coef
The total dimension, sum(d_j)
The sample size
The number of candidate theta values
sspace_3_5 <- sspace_multinom(3, 5) calc_multinom_probs(sspace_3_5, sample_unit_simplexn(3, 10), apply(matrix(sspace_3_5, ncol = 3, byrow = TRUE), 1, log_multinom_coef, sumx = 5), 3, 5, 10)
Run the code above in your browser using DataLab