# Find the OTC for non-informative
# two-stage hierarchical (Dorfman) testing.
OTC1(algorithm = "D2", p = 0.05, Se = 0.99, Sp = 0.99,
group.sz = 2:100, obj.fn = "ET",
trace = TRUE, print.time = TRUE)
# Find the OTC for informative two-stage hierarchical
# (Dorfman) testing.
# A vector of individual probabilities is generated using
# the expected value of order statistics from a beta
# distribution with p = 0.01 and a heterogeneity level
# of alpha = 0.5.
set.seed(52613)
OTC1(algorithm = "ID2", p = 0.01, Se = 0.95, Sp = 0.95,
group.sz = 50, obj.fn = c("ET", "MAR", "GR"),
weights = matrix(data = c(1, 1, 10, 10, 0.5, 0.5),
nrow = 3, ncol = 2, byrow = TRUE), alpha = 0.5,
trace = FALSE, print.time = TRUE, num.sim = 10000)
# Find the OTC over all possible testing configurations
# for non-informative three-stage hierarchical testing
# with a specified group size.
OTC1(algorithm = "D3", p = 0.001, Se = 0.95, Sp = 0.95,
group.sz = 18, obj.fn = "ET",
trace = FALSE, print.time = FALSE)
# Find the OTC for non-informative three-stage
# hierarchical testing.
OTC1(algorithm = "D3", p = 0.06, Se = 0.90, Sp = 0.90,
group.sz = 3:30, obj.fn = c("ET", "MAR", "GR"),
weights = matrix(data = c(1, 1, 10, 10, 100, 100),
nrow = 3, ncol = 2, byrow = TRUE))
# Find the OTC over all possible configurations
# for informative three-stage hierarchical testing
# with a specified group size and a heterogeneous
# vector of probabilities.
set.seed(1234)
OTC1(algorithm = "ID3",
probabilities = c(0.012, 0.014, 0.011,
0.012, 0.010, 0.015),
Se = 0.99, Sp = 0.99, group.sz = 6,
obj.fn = "ET",
alpha = 0.5, num.sim = 5000, trace = FALSE)
# Calculate the operating characteristics for
# non-informative array testing without master pooling
# with a specified array size.
OTC1(algorithm = "A2", p = 0.005, Se = 0.95, Sp = 0.95,
group.sz = 8, obj.fn = "ET", trace = FALSE)
# Find the OTC for informative array testing without
# master pooling.
# A vector of individual probabilities is generated using
# the expected value of order statistics from a beta
# distribution with p = 0.03 and a heterogeneity level
# of alpha = 2. The probabilities are then arranged in
# a matrix using the gradient method.
set.seed(1002)
OTC1(algorithm = "IA2", p = 0.03, Se = 0.95, Sp = 0.95,
group.sz = 2:20, obj.fn = c("ET", "MAR", "GR"),
weights = matrix(data = c(1, 1, 10, 10, 100, 100),
nrow = 3, ncol = 2, byrow = TRUE),
alpha = 2)
# Find the OTC for non-informative array testing
# with master pooling. The calculations may not
# be completed instantaneously.
OTC1(algorithm = "A2M", p = 0.04, Se = 0.90, Sp = 0.90,
group.sz = 2:20, obj.fn = "ET")
Run the code above in your browser using DataLab