  Response-adaptive (RA) designs of clinical trials allow targeting a given
objective by skewing the allocation of participants to treatments based on
observed outcomes. RA designs face greater regulatory scrutiny due to potential
type I error inflation, which limits their uptake in practice. Existing
approaches to type I error control either only work for specific designs, have
a risk of Monte Carlo/approximation error, are conservative, or computationally
intractable. We develop a general and computationally tractable approach for
exact analysis in two-arm RA designs with binary outcomes. We use the approach
to construct exact tests applicable to designs that use either randomized or
deterministic RA procedures, allowing for complexities such as delayed
outcomes, early stopping or allocation of participants in blocks. Our efficient
forward recursion implementation allows for testing of two-arm trials with
1,000 participants on a standard computer. Through an illustrative
computational study of trials using randomized dynamic programming we show
that, contrary to what is known for equal allocation, a conditional exact test
has, almost uniformly, higher power than the unconditional test. Two real-world
trials with the above-mentioned complexities are re-analyzed to demonstrate the
value of our approach in controlling type I error and/or improving the
statistical power.
