powered by
Define the simulation function to generate failure probability with Dirichlet prior distributions as conjugate prior to multinomial distributions (for multi-state RDT).
pi_MCSim_dirichlet(M, seed, par)
Simulation sample size
Random seed for random sample
Parameters for dirichlet distribution
Vector of failure probability sample
pi_MCSim_beta
Other Prior distribution generation functions: pi_MCSim_beta()
pi_MCSim_beta()
# NOT RUN { pi <- pi_MCSim_dirichlet(M = 1000, seed = 10, par = c(1, 1, 1)) # }
Run the code above in your browser using DataLab