MFM_core: Probability Core for Multi-state RDT with Multiple Failure...

Description Usage Arguments Value See Also Examples

View source: R/MFM_core.R

Description

Define the summed core function inside of the integration which gets the probability of passing the test given specific failure probabilities under different failure modes (for Multi-state RDT, Multiple Failure Modes).

Usage

1
MFM_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

See Also

MFM_consumerrisk for getting the consumer's risk; MFM_Indicator for getting the binary indicator; MFM_optimal_n for getting the optimal test sample size;

Other MSRDT for MFM functions: MFM_Indicator(), MFM_consumerrisk(), MFM_optimal_n()

Examples

1
2
3
4
5
6
7
8
#' #Example for two failure modes
pi1 <- pi_MCSim_beta(M = 1000, seed = 10, a = 1, b = 1)
pi2 <- pi_MCSim_beta(M = 1000, seed = 10, a = 2, b = 18)
MFM_core(n = 10, cvec = c(1, 1), pivec = c(pi1[1], pi2[1]));
#The function also works for more than two failure modes.
#However, the computation cost may increase.
#Example for three failure modes
MFM_core(n = 10, cvec = c(1, 1, 1), pivec = c(0.8, 0.9, 0.8));

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