*! version 1.2.1.1 2jun2023

Title

artcat -- A Stata program to calculate sample size or power for a 2-group trial with ordered categorical outcome.

Syntax

artcat,
pc(numlist) pe(numlist)|or(exp)|rr(exp) power(#)|n(#)
[options]

Control group options
pc(numlist) Required. Probabilities in each outcome level; the right-most level may be omitted.

cumulative The probabilities in pc(numlist) are cumulative probabilities.

unfavourable The left-most outcome level represents the least favourable outcome. The spelling unfavorable is also allowed.

favourable The left-most outcome level represents the most favourable outcome. The spelling favorable is also allowed.

Experimental group options

One of pe(numlist), or(exp) and rr(exp) must be specified.

pe(numlist) Probabilities in each outcome level, specified as for pc(numlist); or cumulative probabilities, if the cumulative option is used.

or(exp) Odds ratio at each outcome level.
An odds ratio less than one means that the distribution in the experimental group is shifted towards the right-most level compared with the control group.

rr(exp) Risk ratio at each outcome level except the right-most.
A risk ratio less than one means that the experimental group has lower probability at every level except the right-most level compared with the control group.

Trial type options
margin(#) Specifies the margin, as an odds ratio, for a non-inferiority or substantial superiority trial.
If the unfavourable option is specified
then #>1 specifies a non-inferiority trial,
and #<1 specifies a substantial-superiority trial.
If the favourable option is specified then it's the other way round.
If margin(#) is not specified, or #=1, then a superiority trial is assumed.

Sample size options
power(#) Power required: sample size will be computed. The default is power(0.8)
if neither power(#)
nor n(#) is specified.

n(#) Total sample size: power will be computed.

aratio(# #) Allocation ratio: e.g. aratio(1 2) means 2 participants in the experimental group for every 1 participant in the control group.

alpha(#) Significance level. Default is 0.05.

onesided The level specified by alpha(#) is the one-sided significance level. Default is two-sided.

Method options
ologit(type) Use the ologit (new) method.
type may be NN, NA or AA.
The default is ologit(NA).
See Which method? below.

ologit Same as ologit(NA).

whitehead Use the Whitehead method. This option requires or(exp) to be specified and is not available with margin(#).

Output options
noprobtable Do not display table of anticipated probabilities (probabilities at each level in control and experimental group).

probformat(string) Format for displaying table of anticipated probabilities (default is %-5.1f).

format(string) Format for displaying calculated sample sizes (default is %6.1f) or powers (default is %6.3f).

noround Do not round sample size to next largest integer.

noheader Do not print header describing the program.

Description

artcat calculates sample size given power, or power given sample size, for a 2-group randomised controlled trial with an ordered categorical outcome.
Superiority, non-inferiority and substantial-superiority (also called super-superiority) trial types are all supported.

We assume the trial will be analysed under the proportional odds model, and treatment effects are expressed on the odds ratio scale.
However, the proportional odds model does not have to be true.
The anticipated treatment effect may instead be expressed as a common risk ratio or by specifying the outcome distribution.
In these cases, an odds ratio is fitted to the anticipated data and referred to as the average odds ratio.

artcat is an immediate command: it does not use the data in memory.

This is a user-written command: please cite our paper, which also gives more details of the methods.

Which method?

All the methods are similar for moderate anticipated treatment effects - for example, for odds ratios between 0.7 and 1.4.

With large anticipated treatment effects, our simulations show that the default method, ologit(NA), is the most reliable.
The Whitehead method, which gives exactly the same results as ologit(NN),
tends to underestimate sample size and overestimate power.
Conversely, ologit(AA) tends to overestimate sample size and underestimate power.

The theoretical explanation is that ologit(NA) correctly uses both the null and the alternative variances of the log odds ratio,
whereas ologit(NN) uses only the null variance of the log odds ratio (which is smaller)
and ologit(AA) uses only the alternative variance of the log odds ratio (which is larger).

artcat for observational studies

artcat can also be used to design observational studies to explore a protective or harmful factor.
The trial types and outcome levels may need to be re-interpreted as shown in the table below.
Because clinical trials always aim to improve health, an observational study of a beneficial factor is most easily re-interpreted.
It is convenient to re-express an observational study of a harmful factor (risk factor) as one of a beneficial factor
by reversing the control and experimental groups.
If this is not possible then it is necessary to invert unfavourable and favourable: for example, if the left-most outcome level is the most favourable outcome, then specify the unfavourable option.
The calculation ignores confounding: it may be reasonable in the presence of moderate confounding, but not with substantial confounding.

Trial type Corresponding type for observational study
as in program output of benefit of harm (invert
unfavourable/favourable)

Superiority Benefit Harm
Non-inferiority Non-harm Non-benefit
Substantial-superiority Substantial-benefit Substantial-harm

Examples

We reproduce the sample size calculation for the FLU-IVIG trial (Davey et al 2019).
The control group was anticipated to have a 1.8% probability of the least favourable outcome (death),
a 3.6% probability of the next least favourable outcome (admission to an intensive care unit),
and so on up to 25.9% probability of the most favourable outcome (discharged with full resumption of normal activities).
The trial was designed to have 80% power if the treatment achieves an odds ratio of 1.77 for a favourable outcome.

We can express this either by setting the left-most level as the least favourable outcome and inverting the odds ratio:

artcat, pc(.018 .036 .156 .141 .390 .259) or(1/1.77) power(.8) unfavourable

or by setting the left-most level as the most favourable outcome:

artcat, pc(.259 .390 .141 .156 .036 .018) or(1.77) power(.8) favourable

Note that the tables of anticipated probabilities from these two commands are the same (but inverted).

We don't need to specify favourable or unfavourable, as the program can infer this, but note the warning message printed:

artcat, pc(.018 .036 .156 .141 .390 .259) or(1/1.77) power(.8)

The right-most probability could be omitted in the syntax above, and we do this from now on.
We next check that the power is very close to 80% if we recruit the required 322 participants:

artcat, pc(.018 .036 .156 .141 .39) or(1/1.77) n(322) unfavourable

We compare the new methods with the Whitehead method:

artcat, pc(.018 .036 .156 .141 .390) or(1/1.77) power(.8) whitehead unfavourable

We design a subsequent non-inferiority trial, using the above treatment (assumed successful with OR=1/1.77 as expected) as the control group, and setting a margin that retains half the effect (sqrt(1.77)=1.33):

artcat, pc(.010 .021 .099 .103 .384) or(1) margin(1.33) power(.8) unfavourable

Stored results

Scalars - Sample size (if calculated)

r(n) Sample size

r(n_whitehead) Sample size by Whitehead method

r(n_ologit_NN) Sample size by ologit NN method

r(n_ologit_NA) Sample size by ologit NA method

r(n_ologit_AA) Sample size by ologit AA method

Scalars - Power (if calculated)

r(power) Power

r(power_whitehead) Power by Whitehead method

r(power_ologit_NN) Power by ologit NN method

r(power_ologit_NA) Power by ologit NA method

r(power_ologit_AA) Power by ologit AA method

References

Davey RT, Fernández-Cruz E, Markowitz N, Pett S, Babiker AG, Wentworth D, et al.
Anti-influenza hyperimmune intravenous immunoglobulin for adults with influenza A or B infection (FLU-IVIG):
a double-blind, randomised, placebo-controlled trial. Lancet Respir Med 2019;7:951–63.
https://doi.org/10.1016/S2213-2600(19)30253-X

Whitehead J. Sample size calculations for ordered categorical data. Stat Med 1993;12:2257–71.
http://doi.wiley.com/10.1002/sim.4780122404

Citation

If you find this command useful, please cite it as below (and please check for updates):

Ian R. White, Ella Marley-Zagar, Tim P Morris, Mahesh K. B. Parmar, Patrick Royston, Abdel G. Babiker.
Sample size calculation for an ordered categorical outcome.
Stata Journal 2023:1;3-23.
https://journals.sagepub.com/doi/pdf/10.1177/1536867X231161934

The author (below) would love to hear from you about how you are using the package.

Author and updates

The program was written by Ian White with input and support from Ella Marley-Zagar, Tim Morris, Max Parmar, Patrick Royston and Ab Babiker.
All authors are at the MRC Clinical Trials Unit at UCL, London, UK.

Email ian.white@ucl.ac.uk.

You can get the latest version of this software from https://github.com/UCL/artcat
or within Stata by running
net from https://raw.githubusercontent.com/UCL/artcat/master/package/.

You can browse my other Stata software using
net from http://www.homepages.ucl.ac.uk/~rmjwiww/stata/.

See Also

artbin (if installed)

artsurv (if installed)