*! version 1.0 June 27, 2023
help titebeta

Title

titebeta -- Bayesian toxicity monitoring with Beta prior and censored event data

Syntax

titebeta

[, options]

Required, but the routine will run with default values
maxtime Maximum Time, end of observation period

toxrate Target toxicity rate

a Parameter "a" for the beta prior

b Parameter "b" for the beta prior

pprbound Posterior probability bound/limit

Truly Optional: alternate specification of weights
userwt(varname) User supplied weights from data

wtpwr(real>0) Power applied to weight, skews importance early or late

Description

titebeta is a routine for safety monitoring of late onset toxicities in phase 2 (and 3) clinical
trials. It calculates the posterior probability that the toxicity event rate exceeds a limit,
based on censored data for toxicities and a beta prior. Data are entered as a list of two variables,
with the first depvar being a 0/1 toxicity outcome, and the second being an elapsed
time variable. The calculation uses the weighting scheme described by Cheung & Thall (2002), for the simple
case that considers only toxicity monitoring, and not complex trial outcomes.

The routine requires several pre-defined values in order to run. These may be user supplied, but the routine
will run based on default values. Weights are generally thought of as a proportion of information on
toxicity for a given patient based on time elapsed, and are, by default, calculated as time/maxtime, with a
maximum value of 1.0. Weighting can accommodate other patterns of information accrued over time, either
by user-supplied weights, or by a parameter that skews toxicity events later or earlier within the observation
window.

The routine imports the data into MATA, and uses the quadrature function in MATA to integrate the PDF (from
the beta prior and Cheung & Thall's Likelihood. The routine reports the posterior probability that the true
toxicity rate exceeds the target rate, and by referencing the specified upper limit, makes a recommendation
to either continue accrual or stop.

Options

Required Parameter Values

maxtime(real): This is the length of the observation time window for recording toxicity
events. It is used for calculating the simple weight proportional to time elapsed. It can take on any
positive value, to match whatever time scale is used. The default value is 180, implying 6 months of
daily observation. Make sure that this value matches the scale of the elapsed time variable entered.

toxrate(real): This is the maximum allowable true toxicity rate. This may be a value that comes from
phase 1 trials. It can fall between 0 and 1, although values above 0.4 and below 0.1 will be of little use or
meaning. The default value is 0.3, a common default toxicity rate from phase 1 trials.

a(real) and b(real): The parameters "a" and "b" define the beta(a,b) prior distribution. Both are
real numbers greater than zero, and our defaults are a=1 and b=2, which is a common start for toxicity monitoring.
The mean value for the prior is a/(a+b). You can get to the desired mean in infinte ways, but making a and b
smaller will tend to put more weight in the tails, and making them larger will add more weight towards the mean value.

pprbound(real): The routine titebeta returns the posterior probability that the true toxicity rate exceeds
the target value (toxrate). The parameter pprbound is the maximum allowable value for that posterior probability
before haltinng the trial. The range can be 0 to 1, but numbers in the range of 0.75 to 0.95 make sense and are
in common use. The default is 0.9.

Alternate Weighting (Use only one of these)

userwt(varname): This is a variable name for user supplied weights from data set. If a variable name is
entered, the routine will use the user supplied weights rather than calculating them. This will be useful if there
is a known time pattern to the occurrence of toxicity events for the trial agent. There is no default. If not supplied,
the routine will calculate weights.

wtpwr(real): This provides a simple way to skew the weighting to earlier or later in the observation window, by
taking the calculated weight and applying wtpwr as an exponent. The default value is 1.0, meaning no change. It
can take on any value greater than zero; values below 1.0 provide more information earlier in the observation window,
while values above 1.0 delay the information to the later part of the window.

Examples

Setup

. list

+----------------------+
| pid toxicity tte |
|----------------------|
1. | 1 0 181 |
2. | 2 0 181 |
3. | 3 1 168 |
4. | 4 0 181 |
5. | 5 1 98 |
|----------------------|
6. | 6 0 181 |
7. | 7 1 141 |
8. | 8 0 179 |
9. | 9 0 102 |
10. | 10 0 42 |
|----------------------|
11. | 11 0 24 |
12. | 12 0 3 |
+----------------------+

Entering varlist: toxicity tte, and setting the observation window to 181 days.

. titebeta toxicity tte, maxt(181)

Also changing target toxicity rate to 0.25.

. titebeta toxicity tte, maxt(181) tox(.25)

Also changing the maximum permissible posterior probability of exceeding toxrate to 0.85 from default 0.9.

. titebeta toxicity tte, maxt(181) tox(.25) pprb(.85)

Also changing the maximum permissible posterior probability of exceeding toxrate to 0.7 from default 0.9.

. titebeta toxicity tte, maxt(181) tox(.25) pprb(.7)

Saved results

titebeta saves the following r-class results.

scalars:

r(pprob): "Posterior probability that toxicity rate exceeds limit"
r(weight_power): "Power (exponent) on time elapsed / maxtime user weight"
r(max_ppr): "Maximum value for the posterior probability before stopping the study"
r(toxmax): "Target upper limit for toxicity rate"
r(maxtime): "Time limit- End of the toxicity observation window"
r(beta_b): "Beta prior, parameter a"
r(beta_a): "Beta prior, parameter b"

macros:

r(timevar): "Variable name- time elapsed"
r(toxvar): "Variable name- toxicity event (0/1)"
r(toxvar): "Variable name- User provided weights"
r(decision): "Decision to continue or halt"

Author

E. Paul Wileyto

epw@pennmedicine.upenn.edu

Also see

Cheung, Y.K. and Thall, P.F. (2002), Monitoring the Rates of Composite Events with Censored Data in Phase II Clinical Trials. Biometrics, 58: 89-97. article