1 The SAS System 15:22 Thursday, April 20, 2000 NOTE: Copyright (c) 1998 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Version 7 (TS P1) Licensed to UNIVERSITY OF WISCONSIN, Site 0002176032. NOTE: This session is executing on the OSF1 V4.0 platform. 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: SAS initialization used: real time 2.74 seconds cpu time 0.44 seconds 1 options nocenter ps=64 ls=80; /* MJ 23: balanced and unbalanced mixed 1 ! model */ 2 data mixed; 3 input machine person score1 score2 score3; 4 datalines; NOTE: The data set WORK.MIXED has 18 observations and 5 variables. NOTE: DATA statement used: real time 1.00 seconds cpu time 0.11 seconds 23 ; 24 data bal; set mixed; 25 score = score1; time=1; output; 26 score = score2; time=2; output; 27 score = score3; time=3; output; 28 drop score1--score3; NOTE: The data set WORK.BAL has 54 observations and 4 variables. NOTE: DATA statement used: real time 0.16 seconds cpu time 0.04 seconds 29 data unbal; set bal; /* artificially delete data */ 30 if machine = 1 and person = 1 and time > 1 then delete; 31 if machine = 1 and person = 2 and time = 3 then delete; 32 if machine = 1 and person = 3 and time > 1 then delete; 33 if machine = 1 and person = 4 and time = 3 then delete; 34 if machine = 2 and person = 1 and time < 3 then delete; 35 if machine = 2 and person = 3 and time = 3 then delete; 36 if machine = 2 and person = 5 and time = 3 then delete; 37 NOTE: The data set WORK.UNBAL has 44 observations and 4 variables. NOTE: DATA statement used: real time 0.13 seconds cpu time 0.04 seconds 38 proc glm data=bal; /* balanced case -- glm */ 39 class machine person; 2 The SAS System 15:22 Thursday, April 20, 2000 40 model score = machine person machine*person / ss3; 41 random person machine*person / test; 42 test h = machine e = machine*person; 43 contrast 'machine 1 vs. 2' machine 6 -6 0 machine*person 44 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 / e = machine*person; 45 contrast 'machine 2 vs. 3' machine 0 6 -6 machine*person 46 0 0 0 0 0 0 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 / e = machine*person; 47 contrast 'machine 1 vs. 3' machine 6 0 -6 machine*person 48 1 1 1 1 1 1 0 0 0 0 0 0 -1 -1 -1 -1 -1 -1 / e = machine*person; 49 NOTE: The PROCEDURE GLM printed pages 1-5. NOTE: PROCEDURE GLM used: real time 6.95 seconds cpu time 0.35 seconds 50 proc mixed data=bal; /* balanced case -- mixed */ 51 class machine person; 52 model score = machine / ddfm = satterth; 53 random person machine*person; 54 contrast 'machine 1 vs. 2' machine 1 -1 0; 55 contrast 'machine 2 vs. 3' machine 0 1 -1; 56 contrast 'machine 1 vs. 3' machine 1 0 -1; 57 lsmeans machine / diffs; 58 NOTE: Convergence criteria met. NOTE: The PROCEDURE MIXED printed pages 6-7. NOTE: PROCEDURE MIXED used: real time 1.17 seconds cpu time 0.21 seconds 59 proc glm data=unbal; /* unbalanced case -- glm using Type I as in MJ 59 ! 23 */ 60 class machine person; 61 model score = machine person machine*person / e1 ss1; 62 random person machine*person / test; 63 test h = machine e = machine*person; 64 contrast 'machine 1 vs. 2' machine 6 -6 0 machine*person 65 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 / e = machine*person; 66 contrast 'machine 2 vs. 3' machine 0 6 -6 machine*person 67 0 0 0 0 0 0 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 / e = machine*person; 68 contrast 'machine 1 vs. 3' machine 6 0 -6 machine*person 69 1 1 1 1 1 1 0 0 0 0 0 0 -1 -1 -1 -1 -1 -1 / e = machine*person; 70 NOTE: The PROCEDURE GLM printed pages 8-14. NOTE: PROCEDURE GLM used: real time 0.35 seconds cpu time 0.19 seconds 71 proc glm data=unbal; /* unbalanced case -- glm using Type III */ 72 class machine person; 73 model score = machine person machine*person / ss3; 74 random person machine*person / test; 75 test h = machine e = machine*person; 76 contrast 'machine 1 vs. 2' machine 6 -6 0 machine*person 77 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 / e = machine*person; 78 contrast 'machine 2 vs. 3' machine 0 6 -6 machine*person 3 The SAS System 15:22 Thursday, April 20, 2000 79 0 0 0 0 0 0 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 / e = machine*person; 80 contrast 'machine 1 vs. 3' machine 6 0 -6 machine*person 81 1 1 1 1 1 1 0 0 0 0 0 0 -1 -1 -1 -1 -1 -1 / e = machine*person; 82 NOTE: The PROCEDURE GLM printed pages 15-19. NOTE: PROCEDURE GLM used: real time 0.28 seconds cpu time 0.16 seconds 83 proc mixed data=unbal; /* unbalanced case -- mixed -- the correct 83 ! way! */ 84 class machine person; 85 model score = machine / ddfm = satterth; 86 random person machine*person; 87 contrast 'machine 1 vs. 2' machine 1 -1 0; 88 contrast 'machine 2 vs. 3' machine 0 1 -1; 89 contrast 'machine 1 vs. 3' machine 1 0 -1; 90 lsmeans machine / diffs; NOTE: Convergence criteria met. NOTE: The PROCEDURE MIXED printed pages 20-21. NOTE: PROCEDURE MIXED used: real time 0.18 seconds cpu time 0.13 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 14.12 seconds cpu time 1.81 seconds