sprt_plot: Plot SPRT results

View source: R/sprt_plot.R

sprt_plotR Documentation

Plot SPRT results

Description

Plot SPRT results

Usage

sprt_plot(res)

Arguments

res

A list returned by sprt().

Value

A ggplot object showing the SPRT path with thresholds and decision point.

Examples

x <- c(0,0,1,0,1,1,1,0,0,1,0,0)
res <- sprt(x, alpha = 0.05, beta = 0.1, p0 = 0.1, p1 = 0.3)
print(res)
sprt_plot(res)

x1 <- c(52, 55, 58, 63, 66, 70, 74)
result1 <- sprt(x1, alpha = 0.05, beta = 0.1, p0 = 50, p1 = 65, dist = "normal", sigma = 10)
result1
sprt_plot(result1)

SPRT documentation built on Sept. 15, 2025, 9:08 a.m.