**************************************************************************; ** Code name : v108c01.sas **; ** Authors : Ying Zhang **; ** John Preisser **; ** Date : June-11-2023 **; ** SAS version : SAS 9.4 or higher or SAS studo **; ** Description : CRTFASTGEEPWR is a sas macro compute GEE power for **; ** binary/Count/Continuous outcomes and **; ** complete/incomplete multiple-CRT based on the **; ** general GEE power method proposed by Rochon and **; ** in the JSS fast GEE power manuscript; **; ** The sas code is the example codes in illustraing **; ** the use of CRTFASTGEEPWR for complete and **; ** incomplete SW-CRTs in the JSS manuscript revised **; ** This macro is available at **; ** http://www.bios.unc.edu/~preisser/personal/crtfastgeepwr/ **; ** with SAS code and the example codes **; ** Contact email: zyingunc@gmail.com **; **************************************************************************; *************************************************************************; *********Include the SAS macro CRTFASTGEEPWR in the stored folder *******; *************************************************************************; %include "G:\projects\swcrt\JSS_CRTFASTGEEPWR\CRTFASTGEEPWR.v2.04.sas"; *************************************************************************************************; ** The 1st example illustrates power calculation based on the Connect-Home trial design *********; ** with linear period effects and incremental intervention effect for a continuous outcome, *****; ** patient preparedness for home care ******; *************************************************************************************************; %CRTFASTGEEPWR(alpha=0.05, m =%str(J(6,1,1)), corr_type = NE,alpha1 = 0.03,alpha2 = 0.015 , intervention_effect_type=INC, delta = 10, period_effect_type=LIN,max_intervention_period = 10, beta_period_effects =%str({68,0.1 }) ,dist = NORMAL,phi=64, CP_size_matrix = %str({4 4 4 4 4 0 0 4 4 4 4 4 4 4 4 4 4 0 0 0 0 0, 0 4 4 4 4 4 4 0 0 4 4 4 4 4 4 4 4 4 0 0 0 0, 0 0 4 4 4 4 4 4 4 0 0 4 4 4 4 4 4 4 4 0 0 0, 0 0 0 4 4 4 4 4 4 4 4 0 0 4 4 4 4 4 4 4 0 0 , 0 0 0 0 4 4 4 4 4 4 4 4 4 0 0 4 4 4 4 4 4 0, 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 0 0 4 4 4 4 4}), DesignPattern = %str({0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2, 2 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 1 2 2 2 2, 2 2 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 2 2 2, 2 2 2 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 2 2, 2 2 2 2 0 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 2, 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1})); ***************************************************************************************************; ** The second example illustrates power calculation based on the Connect-Home trial design ********; ** with linear period effects and average intervention effects model for a count outcome, ********; ** days of acute care use for patients. ********; ***************************************************************************************************; %CRTFASTGEEPWR(alpha=0.05, m =%str(J(6,1,2)), corr_type = ED, alpha0 = 0.03,r0 = 0.8 , intervention_effect_type=AVE, delta = -0.511, period_effect_type=LIN, beta_period_effects =%str({0.215,-0.01}) ,dist = POISSON,phi=1.2, CP_size_matrix = %str({4 4 4 4 4 0 0 4 4 4 4 4 4 4 4 4 4 0 0 0 0 0, 0 4 4 4 4 4 4 0 0 4 4 4 4 4 4 4 4 4 0 0 0 0, 0 0 4 4 4 4 4 4 4 0 0 4 4 4 4 4 4 4 4 0 0 0, 0 0 0 4 4 4 4 4 4 4 4 0 0 4 4 4 4 4 4 4 0 0 , 0 0 0 0 4 4 4 4 4 4 4 4 4 0 0 4 4 4 4 4 4 0, 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 0 0 4 4 4 4 4}), DesignPattern = %str({0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2, 2 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 1 2 2 2 2, 2 2 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 2 2 2, 2 2 2 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 2 2, 2 2 2 2 0 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 2, 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1})); *******************************************************************************************************; ** The third example illustrates power calculation based on the decision-making design ********; ** with categorical period effects and average intervention effects model for binary outcome ********; *******************************************************************************************************; %CRTFASTGEEPWR(alpha=0.05, m =%str(J(5,1,8)), corr_type = ED, alpha0 = 0.03,r0 = 0.8 , intervention_effect_type=AVE, delta = -0.789, period_effect_type=CAT, beta_period_effects =%str({-1.266,0.01,0.01,0.01,0.01,0.01}) ,dist = binary,phi=1, CP_size_matrix = %str(J(5,6,2)), DesignPattern = %str({0 1 1 1 1 1, 0 0 1 1 1 1, 0 0 0 1 1 1, 0 0 0 0 1 1, 0 0 0 0 0 1})); ********************************************************************************************************; ** The Fourth example illustrates power calculation based on the Heart Health NOW study ********; ** with linear period effects and extended incremental intervention effects model for binary outcome ***; ********************************************************************************************************; %CRTFASTGEEPWR(alpha=0.05, m =%str(J(6,1,30)), corr_type = NE,alpha1 = 0.03,alpha2 = 0.015 , intervention_effect_type=INC_EX, delta = -0.288, period_effect_type=LIN, beta_period_effects =%str({-2.944,-0.01}) ,dist = binary,phi=1, CP_size_matrix = %str(J(6,11,100)),max_intervention_period = 4, DesignPattern = %str({0 1 1 1 1 1 1 1 1 1 1 , 0 0 1 1 1 1 1 1 1 1 1 , 0 0 0 1 1 1 1 1 1 1 1 , 0 0 0 1 1 1 1 1 1 1 1, 0 0 0 0 1 1 1 1 1 1 1, 0 0 0 0 0 1 1 1 1 1 1})); ********************************************************************************************************; ** The appendix example C.1 illustrates power calculation based on a closed-cohort study. ******; ** with decaying cluster size for a continuous outcome in the Connect Home study ***; ********************************************************************************************************; %CRTFASTGEEPWR(alpha=0.05, m =%str(J(6,1,1)), corr_type = BE,alpha1 = 0.03,alpha2 = 0.015,alpha3 = 0.2, intervention_effect_type=INC, delta = 10, period_effect_type=LIN,max_intervention_period = 10, beta_period_effects =%str({68,0.1 }) ,dist = normal,phi=64, CP_size_matrix = %str({4 4 4 4 4 0 0 4 4 4 4 4 4 4 4 3 3 0 0 0 0 0, 0 4 4 4 4 4 4 0 0 4 4 4 4 4 4 4 3 3 0 0 0 0, 0 0 4 4 4 4 4 4 4 0 0 4 4 4 4 4 4 3 3 0 0 0, 0 0 0 4 4 4 4 4 4 4 4 0 0 4 4 4 4 4 3 3 0 0 , 0 0 0 0 4 4 4 4 4 4 4 4 4 0 0 4 4 4 4 3 3 0, 0 0 0 0 0 4 4 4 4 4 4 4 4 4 4 0 0 4 4 4 3 3}), DesignPattern = %str({0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2, 2 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 1 2 2 2 2, 2 2 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 1 2 2 2, 2 2 2 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 1 2 2, 2 2 2 2 0 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1 1 2, 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 2 2 1 1 1 1 1})); ********************************************************************************************************; ** The appendix example C.2 illustrates power calculation based on the EDUL study. ******; ** with linear period effects and average intervention effects model for binary outcome ***; ********************************************************************************************************; %CRTFASTGEEPWR(alpha=0.05, m =%str(J(2,1,20)), corr_type = NE,alpha1 = 0.02,alpha2 = 0.01 , intervention_effect_type=AVE, delta = -0.357, period_effect_type=CAT, beta_period_effects =%str({0.405,-0.01,-0.01}) ,dist = binary,phi=1, CP_size_matrix = %str(J(2,3,30)), DesignPattern = %str({0 1 1, 0 0 0})); ********************************************************************************************************************; ** The appendix example C.2 illustrates power calculation based on the EDUL study. ******************; ** with linear period effects and average intervention effects model for a binary outcome, the underage drinking ***; ** with varying effect size such that the intervention reduces 20%, 25%, 30%, 35%, 40% odds of underage drinking;***; ********************************************************************************************************************; %macro multi_effectsizes(effectsizes ); %local index value; %do index = 1 %to %sysfunc(countw(&effectsizes,%str( ))); %let value =%scan(&effectsizes,&index,%str( )); %CRTFASTGEEPWR(alpha=0.05, m =%str(J(2,1,20)), corr_type = NE,alpha1 = 0.02,alpha2 = 0.01 , intervention_effect_type=AVE, delta = &value, period_effect_type=CAT, beta_period_effects =%str({0.405,-0.01,-0.01}) ,dist = binary,phi=1, CP_size_matrix = %str(J(2,3,30)), DesignPattern = %str({0 1 1, 0 0 0})); %end; %mend; %multi_effectsizes(-0.223 -0.288 -0.357 -0.431 -0.511);