MPSep_core: Probability Core for Multi-state RDT with Multiple Periods...

Description Usage Arguments Value Examples

View source: R/MPSep_core.R

Description

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 separate period need to be satisfied to pass the test (for Multi-state RDT, Multiple Periods, Scenario II).

Usage

1
MPSep_core(n, cvec, pivec)

Arguments

n

RDT sample size

cvec

Maximum allowable failures for each separate period

pivec

Failure probability for each seperate period

Value

Core probability of passing the test given specific failure probabilities

Examples

1
2
3
4
5
6
7
#Example for two periods
pi <- pi_MCSim_dirichlet(M = 1000, seed = 10, par = c(1, 1, 1))
MPSep_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))
MPSep_core(n = 10, cvec = c(1, 1, 1), pivec = pi[1, ]);

MSRDT documentation built on July 2, 2020, 2:13 a.m.