1 The SAS System 13:47 Monday, August 11, 2003 NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0) Licensed to UNC-CHAPEL HILL-SYSTEMWIDE-T/R, Site 0039466002. NOTE: This session is executing on the WIN_PRO platform. NOTE: SAS initialization used: real time 0.27 seconds cpu time 0.21 seconds 1 TITLE1 "EXAMPLEA01.SAS--Two sample T-test"; 2 3 ***************************************************************; 4 * Perform power calculations for a two sample T test, ; 5 * replicating the results in "Increasing scientific power with ; 6 * statistical power", by K.E. Muller and V.A. Benignus, ; 7 * Neurotoxicology and Teratology, vol 14, May-June, 1992 ; 8 * The code reports power for a limited number of predicted ; 9 * differences in means, compared to the number of values ; 10 * needed for plotting. Code for plot is in ExampleA02.sas ; 11 ***************************************************************; 12 13 PROC IML SYMSIZE=1000 WORKSIZE=2000; Worksize = 2048000 Symbol size = 1024000 NOTE: IML Ready 14 %INCLUDE "..\IML\POWERLIB202.IML"/NOSOURCE2; NOTE: Module POWER defined. NOTE: Module _POWER defined. NOTE: Module _RANKSYMM defined. NOTE: Module _SIZECHK defined. NOTE: Module _TYPEMISSCHK defined. NOTE: Module _SETOPT defined. NOTE: Module _HLT defined. NOTE: Module _PBT defined. NOTE: Module _WLK defined. NOTE: Module _SPECIAL defined. NOTE: Module _FIRSTUNI defined. NOTE: Module _HFEXEPS defined. NOTE: Module _GGEXEPS defined. NOTE: Module _LASTUNI defined. NOTE: Module _GLMMPCL defined. NOTE: Module _PROBF defined. NOTE: Module _FINV defined. NOTE: Module _FWARN defined. NOTE: Module _SASDS defined. NOTE: Module _QPROB defined. NOTE: Module _AS defined. NOTE: Module _IROUND defined. 2 The SAS System 13:47 Monday, August 11, 2003 NOTE: Module _COUNTR defined. NOTE: Module _ALOG1 defined. NOTE: Module _EXP1 defined. NOTE: Module _ORDER defined. NOTE: Module _ERRBD defined. NOTE: Module _CTFF defined. NOTE: Module _TRUNCN defined. NOTE: Module _FINDU defined. NOTE: Module _INTEGR defined. NOTE: Module _CFE defined. NOTE: Module NAMELIST defined. NOTE: Module UMEAN defined. NOTE: Module UPOLY1 defined. NOTE: Module UPOLY2 defined. NOTE: Module UPOLY3 defined. 4958 4959 * Define inputs to power program; 4960 4961 SIGMA = {1}; 4962 SIGSCAL= {0.32 1.00 2.05}; 4963 4964 ESSENCEX = I(2); 4965 REPN = { 10 }; 4966 4967 BETA = {0 1}`; 4968 BETASCAL = DO(0,2.5,0.5); 4969 C = {1 -1}; 4970 4971 OPT_OFF= {C U}; 4972 4973 RUN POWER; NOTE: Exiting IML. NOTE: The PROCEDURE IML printed pages 1-3. NOTE: PROCEDURE IML used: real time 0.67 seconds cpu time 0.66 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 1.15 seconds cpu time 0.88 seconds