Hi all,
I calculate sample size for a stepped wedge design, follow instruction in this paper [swdpwr: A SAS macro and an R package for power calculations in stepped wedge cluster randomized trials - PubMed (nih.gov)]
Below is code in part 5.1 page 17, but get the error – please see output right after.
Can you tell how to fix it?
Thank you!
Hao
*The EPT Trial;
data ept;
input numofclusters time1 time2 time3 time4 time5;
cards;
6 0 1 1 1 1
6 0 0 1 1 1
6 0 0 0 1 1
6 0 0 0 0 1
;
run;
%swdpwr(K = 162, design = ept, family = "binomial", model = "marginal",link = "log", type = "cross-sectional", meanresponse_start = 0.05,
meanresponse_end0 = 0.049, meanresponse_end1 = 0.035, typeIerror = 0.05,alpha0 = 0.0047, alpha1 = 0.0047)
--OUTPUT
1 The SAS System 11:01 Saturday, February 25, 2023
1 %_eg_hidenotesandsource;
5 %_eg_hidenotesandsource;
WARNING: Unsupported device 'ACTIVEX' for EXCEL(EGXLSSX) destination. Using device 'ACTXIMG'.
WARNING: Apparent invocation of macro SWDPWR not resolved.
36
37 %swdpwr(K = 162, design = ept, family = "binomial", model = "marginal",link = "log", type = "cross-sectional", meanresponse_start = 0.05,
_
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
38 meanresponse_end0 = 0.049, meanresponse_end1 = 0.035, typeIerror = 0.05,alpha0 = 0.0047, alpha1 = 0.0047)
39
40
41 %_eg_hidenotesandsource;
NOTE: Writing EXCEL(EGXLSSX) file: /saswork/SAS_work9FC300000DDB_vhacdwdwhsas12.vha.med.va.gov/#LN00108
56
57
58 %_eg_hidenotesandsource;
61
... View more