*! version 1.0.2 11 July 2019

*! version 1.0.1 2 April 2019

Title

bcss -- a command to create graphs to show how baseline data (prospective or retrospective) affect sample size for a cluster randomised trial.

Syntax

Prospective data collection:

bcss,
pilist(numlist)
rho(#)
prospective
total(#)
[other_options]

Retrospective data collection:

bcss,
pilist(numlist)
rho(#)
retrospective
endline(#)
[other_options]

Main
pilist(numlist) specifies the ranges of pi (cluster autocorrelation): the correlation between the underlying cluster population means at baseline and endline.

rho(#) the intra-cluster correlation (ICC).

prospective specified when prospective baseline data collection is required.

total(#) the cluster size (n_b+n_e) when prospective data collection is selected, where n_b is the number of baseline measurements and n_e is the number of endline measurements from each cluster.

retrospective specified when retrospective baseline data collection is required.

endline(#) the cluster size (n_e) when retrospective data collection is selected (the baseline data of size n_b is already collected before the trial).

Prospective options

propxaxis(numlist min=2 max=2) the min and max ranges of the x axis for prospective baseline data graphs (proportions).

propyaxis(numlist min=2 max=2) the min and max ranges of the y axis for prospective baseline data graphs.

propystep(numlist max=1) the step on the y axis for prospective baseline data graphs.

Retrospective options

retxaxis(numlist min=2 max=2) the min and max ranges of the x axis for retrospective baseline data graphs (ratios).

retyaxis(numlist min=2 max=2) the min and max ranges of the y axis for retrospective baseline data graphs.

retystep(numlist max=1) the step on the y axis for retrospective baseline data graphs.

General options

legendoptions(string) user defined legend options, such as position and size.

Description

bcss displays graphs examining the impact of varying the amount of prospective/retrospective baseline data collection on the number of clusters required in a cluster randomised trial
with different cluster autocorrelation and intra-cluster correlation values.
See Copas and Hooper for details.

The user must specify either prospective (and total) or retrospective (and endline) in the syntax for prospective or retrospective baseline data collection respectively.

Prospective baseline data are measurements taken as part of the trial, retrospective baseline data are measurements already taken which are not included therefore in the sample size for the trial.

The x axes values on the prospective data graphs are proportions.

The x axes values on the retrospective data graphs are ratios.

The user can choose to change the graph axes, however if one axis range is specified then the corresponding axis must also be specified (e.g. if the user selects certain x axis values, then they must also select the corresponding y axis values).
Either all or none of the axis options must be specified.

The legend position and size can be changed by the user, using standard legend syntax within legendoptions().

Theta opt is the optimum proportion of baseline measurements to maximise power, shown on the prospective data graphs as θ_opt=(mρπ+ρ-1)/[ρm(1+π)] where m = "total cluster size" = n_b+n_e

Please note that it is not advisable to set pi or rho at the boundary values (e.g. 1) for these graphical representations.

Examples

bcss, pi(0.5 0.6 0.7) rho(0.01) pro total(200) propxaxis(0 0.5) propyaxis(1 1.25) propystep(0.05)

bcss, pi(0.5 0.6 0.7) rho(0.01) ret endline(200) retxaxis(0 2) retyaxis(0 1) retystep(0.1)

with user defined legend options:

bcss, pi(0.5 0.6 0.7) rho(0.01) pro total(200) propxaxis(0 0.5) propyaxis(1 1.25) propystep(0.05) leg(pos(5) size(small))

References

Copas AJ and Hooper R. Cluster randomised trials with different numbers of measurements at baseline and endline: Sample size and optimal allocation. Clinical Trials https://journals.sagepub.com/doi/full/10.1177/1740774519873888

Author

Ella Marley-Zagar, MRC Clinical Trials Unit, University College London.

Email e.marley-zagar@ucl.ac.uk

Further note: installation from Github

Please note the latest version of bcss can be found at https://github.com/UCL/bcss/

The bcss.ado file can be installed within Stata directly from github by typing:

net install github, from("https://haghish.github.io/github/")
github install UCL/bcss