1 The SAS System 13:01 Thursday, April 30, 1998 NOTE: Copyright (c) 1989-1996 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 6.11 TS040 Licensed to UNIVERSITY OF WISCONSIN, Site 0002176032. This message is contained in the SAS news file, and is presented upon initialization. Edit the files "news" in the "misc/base" directory to display site-specific news and information in the program log. The command line option "-nonews" will prevent this display. NOTE: AUTOEXEC processing beginning; file is /afs/.cs.wisc.edu/s/sas-6.11/alpha_osf20/sas611/autoexec.sas. NOTE: SAS initialization used: real time 4.95 seconds cpu time 0.53 seconds NOTE: AUTOEXEC processing completed. 1 /* Example of Three-Period Crossover MJ 32.3 */ 2 options nocenter linesize=80 pagesize=50; 3 data cross; 4 infile 'cross3.dat'; 5 input seq person p1 p2 p3; NOTE: The infile 'cross3.dat' is: File Name=/afs/cs.wisc.edu/p/stat/Data/MJ/cross3.dat, Owner Name=yandell,Group Name=6013, Access Permission=rw-r-----, File Size (bytes)=285 NOTE: 15 records were read from the infile 'cross3.dat'. The minimum record length was 18. The maximum record length was 18. NOTE: The data set WORK.CROSS has 15 observations and 5 variables. NOTE: DATA statement used: real time 3.66 seconds cpu time 0.43 seconds 6 data b; set cross; 7 if seq < 3 then do; 8 trt = 'A'; y = p1; carry = 0; period = 1; output; 9 trt = 'B'; y = p2; carry = 1; period = 2; output; 2 The SAS System 13:01 Thursday, April 30, 1998 10 trt = 'A'; if seq = 2 then trt = 'B'; 11 y = p3; carry = -1; period = 3; output; 12 end; 13 if seq > 2 then do; 14 trt = 'B'; y = p1; carry = 0; period = 1; output; 15 trt = 'A'; y = p2; carry = -1; period = 2; output; 16 trt = 'B'; if seq = 4 then trt = 'A'; 17 y = p3; carry = 1; period = 3; output; 18 end; 19 drop p1 p2 p3; NOTE: The data set WORK.B has 45 observations and 6 variables. NOTE: DATA statement used: real time 0.53 seconds cpu time 0.23 seconds 20 proc glm; 21 class seq trt period person; 22 model y = person(seq) trt carry period / solution; 23 lsmeans trt period / stderr pdiff; NOTE: The PROCEDURE GLM printed pages 1-4. NOTE: PROCEDURE GLM used: real time 4.50 seconds cpu time 0.76 seconds 24 proc sort; by seq person; NOTE: The data set WORK.B has 45 observations and 6 variables. NOTE: PROCEDURE SORT used: real time 0.36 seconds cpu time 0.06 seconds 25 proc means noprint; by seq person; 26 var y; 27 output out=c mean=my; NOTE: The data set WORK.C has 15 observations and 5 variables. NOTE: PROCEDURE MEANS used: real time 0.60 seconds cpu time 0.08 seconds 28 data d; set c; 29 trt = 'A'; 3 The SAS System 13:01 Thursday, April 30, 1998 30 if seq = 2 or seq = 3 then trt = 'B'; NOTE: The data set WORK.D has 15 observations and 6 variables. NOTE: DATA statement used: real time 0.38 seconds cpu time 0.18 seconds 31 proc glm; 32 class trt; 33 model my = trt / ss1; 34 lsmeans trt / stderr pdiff; NOTE: The PROCEDURE GLM printed pages 5-7. NOTE: PROCEDURE GLM used: real time 0.80 seconds cpu time 0.16 seconds 35 proc mixed data = b; 36 class trt seq period person; 37 model y = trt carry period / ddfm = satterth; 38 random person(seq); 39 lsmeans trt period / pdiff; NOTE: The PROCEDURE MIXED printed pages 8-9. NOTE: PROCEDURE MIXED used: real time 4.88 seconds cpu time 0.65 seconds NOTE: The SAS System used: real time 22.38 seconds cpu time 3.63 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414