pr_tables: Probability tables

pr_tablesR Documentation

Probability tables

Description

Functions to generate standard 3+3 or generalized probability tables.

Usage

dlt_table(prob, digits = NULL)

pr_table(prob, n, crit, greater = FALSE, digits = NULL)

Arguments

prob

a vector of probabilities

digits

number of digits past the decimal point to keep; if NULL, then no rounding is done

n, crit

sample size and critical number of events, respectively; note that the probabilities will always be calculated as weakly less or greater than crit, i.e., Pr(>= crit) or Pr(<= crit) depending if greater is TRUE or FALSE

greater

logical; the direction of crit: if FALSE, the probabilities are calculated for crit or fewer events; if TRUE, the probabilities are calculated for crit or greater events

Details

dlt_table creates a standard 3+3 dose-limiting toxicity table with probabilities of dose-escalation for true but unknown probabilities of experiencing toxicity.

pr_table is a general single-stage (as opposed to dlt_table) function for calculating the probabilities of crit or fewer (or greater if greater = TRUE) events for true but unknown probabilities of the event occurring.

Examples

prob <- c(1, 5, 1:5 * 10) / 100

## standard 3+3 escalation design for true but unknown
## probabilities of experiencing event
dlt_table(prob)
t(dlt_table(prob, 3))


## probabilities of crit or fewer events given true but unknown prob
pr_table(prob, n = 15, crit = 3, greater = FALSE)


## probabilities of crit or more events given true but unknown prob
pr_table(prob, n = 15, crit = 3, greater = TRUE)

## compare
1 - pr_table(prob, n = 15, crit = 2, greater = FALSE)[2L, ]


raredd/rawr documentation built on March 4, 2024, 1:36 a.m.