*! version 1.0.0 13Oct2021

Title

ordcatsampsi -- power and sample size analysis for ordered categorical outcomes

Syntax

ordcatsampsi
probabilities
, or(#)
[
alpha(#)
power(#)
n(#)
n1(#)
n2(#)
nratio(#)
onesided
]

proportions is a list of proportions which must add up to one. The ith element specifies the probability that an individual will be in outcome level i, averaged over the two treatment groups.

or(#) the expected odds ratio of the treatment effect; or() is required

alpha(#) set the significance level; default is alpha(0.05)

power(#) the desired power; power() cannot be specified together with n(), n1() or n2()

n(#) the total sample size; n() cannot be specified together with power()

n1(#) sample size of the control group; n() cannot be specified together with power()

n2(#) sample size of the experimental group; n() cannot be specified together with power()

nratio(#) ratio of sample sizes, N2/N1; default is nratio(1), meaning equal group sizes

onesided one-sided test; default is two sided

Description

ordcatsampsi computes sample size at a specified power, and power at a specified sample size, for a two sample comparison of ordinal outcomes under the proportional odds ordinal logistic model. The power is the same as that of the Wilcoxon test but with ties handled properly. ordcatsampsi uses the methods of Whitehead (1993) and produces identical results as those produced by the R package popower.

Options

or(#) specifies the expected odds ratio (treatment effect); or() is required.

alpha(#) sets the significance level of the test. The default is alpha(0.05).

power(#) specifies the desired power at which sample size is to be computed.
power() cannot be specified together with n(), n1(), or n2().

n(#) specifies the total number of subjects in the study to be used for determining power.
n() cannot be specified together with power().

n1(#) specifies the number of subjects in the control group to be used for determining power.
n1() cannot be specified together with power().

n2(#) specifies the number of subjects in the experimental group to be used for determining power.
n2() cannot be specified together with power().

nratio(#) specifies the sample-size ratio of the experimental group relative to the control group,
N2/N1, for two-sample tests. The default is nratio(1), meaning equal allocation between the two groups.

onesided(#) indicates a one-sided test. The default is two sided.

Examples

1) Computing sample size

Using the worked example in Campbell et al (1995), the 4 categories are "normal", "slightly listless", "moderately listless", and "very listless", and their respective
proportions are 0.14, 0.24, 0.24, and 0.38. The expected odds ratio is 0.33, and we want an equal number of subjects in both groups with power set to 0.80 and alpha 0.05.

. ordcatsampsi 0.14 0.24 0.24 0.38, or(.33) nratio(1) power(0.80) alpha(0.05)

2) Computing power

Same as above but we specify total n = 84 to find the power at that sample size.

. ordcatsampsi 0.14 0.24 0.24 0.38, or(.33) n(84)

Stored results

ordcatsampsi stores the following in r():

Scalars

r(power) estimated power

r(n) computed total sample size

r(n1) computed sample size of control group

r(n2) computed sample size of experimental group

References

Campbell, M. J., Julious, S. A. and Altman, D. G. 1995. Sample sizes for binary, ordered categorical and continuous outcomes in two group comparions.
British Medical Journal 311:1145-1148.

Whitehead, J. 1993. Sample size calculations for ordered categorical data. Statistics in Medicine 12:2257–2271.

Citation of ordcatsampsi

ordcatsampsi is not an official Stata command. It is a free contribution
to the research community, like a paper. Please cite it as such:

Linden A. (2021). ORDCATSAMPSI: Stata module to compute power and sample size for ordered categorical outcomes

Authors

Ariel Linden

President, Linden Consulting Group, LLC

alinden@lindenconsulting.org

Also see

Online: power ologit