View source: R/matrixFunctions.r
bcdmat | R Documentation |
Transition Probability Matrices for Common Up-and-Down Designs
bcdmat(cdf, target)
classicmat(cdf)
kmatMarg(cdf, k, lowTarget)
kmatFull(cdf, k, lowTarget, fluffup = FALSE)
gudmat(cdf, cohort, lower, upper)
cdf |
monotone increasing vector with positive-response probabilities. The number of dose levels |
target |
the design's target response rate ( |
k |
the number of consecutive identical responses required for dose transitions (k-in-a-row functions only). |
lowTarget |
logical (k-in-a-row functions only): is the design targeting below-median percentiles, with |
fluffup |
logical ( |
cohort |
|
lower , upper |
( |
Up-and-Down designs (UDDs) generate random walk behavior, whose theoretical properties can be summarized via a transition probability matrix (TPM). Given the number of doses M
, and the value of the cdf F
at each dose (i.e., the positive-response probabilities), the specific UDD rules uniquely determine the TPM.
The utilities described here calculate the TPMs of the most common and simplest UDDs:
The k-in-a-row or fixed staircase design common in sensory studies: kmatMarg(), kmatFull()
(Gezmu, 1996; Oron and Hoff, 2009; see Note). Design parameters are k
, a natural number, and lowTarget
which determines whether k
positive responses are required for dose transition, or k
negative responses. The former is for targets below the median and vice versa.
The Durham-Flournoy Biased Coin Design: bcdmat()
. This design can target any percentile via the target
argument (Durham and Flournoy, 1994).
Cohort or group UDD: gudmat()
, with three design parameters cohort, lower, upper
, for the group size and the up/down rule thresholds (Gezmu and Flournoy, 2006).
The original "classical" median-targeting UDD: classicmat()
(Dixon and Mood, 1948). The classical UDD can be framed as a special case of each of the other 3 UDDs. Functionally, this utility is simply a wrapper for bcdmat()
with target
set to 0.5.
An M\times M
transition probability matrix, except for kmatFull()
with k>1
which returns a larger square matrix; see Note below for details on the latter.
As Gezmu (1996) discovered and Oron and Hoff (2009) further extended, k-in-a-row UDDs with k>1
generate what can be described as a random walk **with k' internal states**. Their full TPM is therefore larger than \eqn{M\times M.} However, in terms of random-walk behavior, most salient properties are better represented via an \eqn{M\times M} matrix analogous to those of the other designs, with transition probabilities marginalized over internal states using their asymptotic frequencies. This matrix is provided by
kmatMarg(), while
kmatFull()' returns the full matrix including internal states. Another perspective on this intriguing design, viewing it as generaating a semi-Markov process, with equivalent results (Sada Allo et al., in review).
In kmatFull()
, there are two matrix-size options. At one of the boundary dose-levels (upper boundary with lowTarget = TRUE
, and vice versa), the k
internal states are practically indistinguishable, so arguably only one of them exists. Hence, the most compact TPM representation, and the function default, is \left[(M-1)k + 1\right]\times \left[(M-1)k + 1\right]
. Using fluffup = TRUE
, users can choose a more aesthetically symmetric (but a bit misleading) full Mk\times Mk
matrix.
Assaf P. Oron <assaf.oron.at.gmail.com>
Dixon WJ, Mood AM. A method for obtaining and analyzing sensitivity data. J Am Stat Assoc. 1948;43:109-126.
Durham SD, Flournoy N. Random walks for quantile estimation. In: Statistical Decision Theory and Related Topics V (West Lafayette, IN, 1992). Springer; 1994:467-476.
Gezmu M. The Geometric Up-and-Down Design for Allocating Dosage Levels. PhD Thesis. American University; 1996.
Gezmu M, Flournoy N. Group up-and-down designs for dose-finding. J Stat Plan Inference. 2006;136(6):1749-1764.
Oron AP, Flournoy N. Up-and-Down: The Most Popular, Most Reliable, and Most Overlooked Dose-Finding Design. New Eng J Stat Data Science 2024; 1-12.
Oron AP, Hoff PD. The k-in-a-row up-and-down design, revisited. Stat Med. 2009;28:1805-1820.
Oron AP, Souter MJ, Flournoy N. Understanding Research Methods: Up-and-down Designs for Dose-finding. Anesthesiology 2022; 137:137–50.
Sada M, Flournoy N, Oron AP, Moler J. The K-in-a-row design as a semi-Markov process. Preprint, University of Navarra.
k2targ
, ktargOptions
to find the k-in-a-row target-response rate for specific k and vice versa.
g2targ
, , gtargOptions
likewise for group up-and-down.
pivec
, currentvec
, cumulvec
, which provide probability vectors of dose-allocation distributions using Up-and-Down TPMs.
# Let's use an 8-dose design, and a somewhat asymmetric CDF
exampleF = pweibull(1:8, shape = 2, scale = 4)
# You can plot if you want: plot(exampleF)
# Here's how the transition matrix looks for the median-finding classic up-and-down
round(classicmat(exampleF), 2)
# Note how the only nonzero diagonals are at the opposite corners. That's how
# odd-n and even-n distributions communicate (see examples for vector functions).
# Also note how "up" probabilities (the 1st upper off-diagnoal) are decreasing,
# while "down" probabilities (1st lower off-diagonal) are increasing, and
# start exceeding "up" moves at row 4.
# Now, let's use the same F to target the 90th percentile, which is often
# the goal of anesthesiology dose-finding studies.
# We use the biased-coin design (BCD) presented by Durham and Flournoy (1994):
round(bcdmat(exampleF, target = 0.9), 2)
# Note that now there's plenty of probability mass on the diagonal (i.e., repeating same dose).
# Another option, actually with somewhat better operational characteristics,
# is "k-in-a-row". Let's see what k to use:
ktargOptions(.9, tolerance = 0.05)
# Even though nominally k=7's target is closest to 0.9, it's generally preferable
# to choose a somewhat smaller k. So let's go with k=6.
# We must also specify whether this is a low (<0.5) or high target.
round(kmatMarg(exampleF, k = 6, lowTarget = FALSE), 2)
# Compare and contrast with the BCD matrix above! At what dose do the "up" and "down"
# probabilities flip?
# Lastly, if you want to see a 43 x 43 matrix - the full state matrix for k-in-a-row,
# run the following line:
round(kmatFull(exampleF, k = 6, lowTarget = FALSE), 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.