Title
lbpower -- Calculate approximate power (or sample size) for longitudinal studies with binary response and two equally sized treatment groups
Syntax
lbpower , nrep(#) dur(#) corrjk(#) dif(#) alpha(#) [ power(numlist) nsize(#) unilateral ]
Description
lbpower Approximates power (or sample size) for longitudinal studies with a binary response and two treatment groups with equal size. It should be used if the log odds can be assumed linear, that is when response probabilities are in the range of 0.2 to 0.8. This formulation also assumes a constant correlation between repeated measurements. Note that this is just an approximation and should be applied with care.
Options
nrep(#) Number of repeated mesurements.
dur(#) Duration of the study.
corrjk(#) Correlation between repeated measurements.
dif(#) Difference in the change of response probabilites between groups (from begining to the end of the study).
alpha(#) Significance level.
power(numlist) Power, sample size is calculated.
nsize(#) Sample size, calculate power.
unilateral(#) Specify if the test is one sided
Either power or nsize must be specified
Example
Suppose that subjects are randomly assigned to receive any of two different suplements on a daily basis. There is no placebo for ethical reasons but in other contexts may be the case. The duration of the study is two years and five measurements will be taken. The researchers would like to detect treatment group differences in the prevalence of anemia of at least 6% per year, that is, 12% in the course of the whole study. The baseline prevalence in this population is about 45% so there is no problem with the linearity assumption for the log odds. Correlation between measurements is assumed to be 0.6
Calculate sample size for power values between 0.7 and 0.9 :
lbpower, nrep(5) dur(2) corrjk(0.6) dif(0.12) alpha(0.05) power(0.7(.05)0.9)
Calculate power for a sample size of 140 per group:
lbpower, nrep(5) dur(2) corrjk(0.6) dif(0.12) alpha(0.05) nsize(140)
Calculate sample size if a power of 80% and a difference of 15% in the change of prevalences (from the beginning to the end of the study) are considered:
lbpower, nrep(5) dur(2) corrjk(0.6) dif(0.15) alpha(0.05) power(0.8)
Saved results
If power is provided, the sample size per group is saved as scalar in r(N1). In case a list of power values is given, each sample size value is stored in r(N1), r(N2), ...
If sample size is specified, power is saved as scalar in r(power)
Author
Amado David Quezada Sánchez Center for Research in Nutrition and Health National Institute of Public Health - Mexico (INSP) Email amado.quezada@insp.mx
Reference
Fitzmaurice/Laird/Ware (2004) Applied Longitudinal Analysis, 411-413.