MPCum_core {MSRDT} | R Documentation |
Define the summed core function inside of the integration which gets the probability of passing the test given specific failure probabilities. The maximum allowable failures for each cumulative period need to be satisfied to pass the test (for Multi-state RDT, Multiple Periods, Scenario I).
MPCum_core(n, cvec, pivec)
n |
RDT sample size |
cvec |
Maximum allowable failures for each separate period |
pivec |
Failure probability for each seperate period |
Core probability of passing the test given specific failure probabilities
#Example for two periods
pi <- pi_MCSim_dirichlet(M = 1000, seed = 10, par = c(1, 1, 1))
MPCum_core(n = 10, cvec = c(1, 1), pivec = pi[1, ]);
#The function also works for more than two periods, however, may increase the computation cost.
#Example for three periods
pi <- pi_MCSim_dirichlet(M = 1000, seed = 10, par = c(1, 1, 1, 1))
MPCum_core(n = 10, cvec = c(1, 1, 1), pivec = pi[1, ]);