/* ------------------------------------------------------ file: NoiseSensitivity.sas Example for proc mixed: animals were previously kept in home cases with a running wheer (exercise) or without a wheel (sedentary) on four days, they were placed in a novel environment and cort was measured on the fifth day they were placed in the novel environment and then subjected to a a loud noise based (loosely) on a project done by serge campeau & sarah sasse ---------------------------------------------------- */ DATA Serge; LENGTH Rat 3 Group $9; INPUT Rat Group $ DGroup Day1 - Day5; DATALINES; 1 Exercise 1 19.37 12.24 10.53 12.29 25.39 2 Exercise 1 16.97 11.18 6.87 2.00 13.43 3 Exercise 1 26.29 18.25 15.88 17.67 29.20 4 Exercise 1 15.85 10.91 6.61 9.13 23.26 5 Exercise 1 28.85 17.32 8.99 2.08 16.80 6 Exercise 1 28.68 16.58 9.11 9.11 25.60 7 Exercise 1 19.99 14.34 12.83 12.49 21.71 8 Exercise 1 29.29 15.93 14.94 15.24 31.17 9 Exercise 1 21.26 16.75 9.25 12.67 23.10 10 Exercise 1 27.26 18.49 14.32 10.37 26.80 11 Exercise 1 23.08 20.21 15.89 15.48 25.64 12 Exercise 1 28.40 20.01 11.36 6.21 18.25 13 Sedentary 0 33.28 23.98 13.07 14.41 26.76 14 Sedentary 0 25.92 20.14 21.66 20.04 38.00 15 Sedentary 0 23.42 12.57 12.84 14.52 31.73 16 Sedentary 0 30.89 17.02 7.59 2.55 17.79 17 Sedentary 0 20.54 20.96 14.97 9.13 24.61 18 Sedentary 0 31.39 22.77 18.26 16.56 32.34 19 Sedentary 0 26.29 24.61 16.83 10.69 24.67 20 Sedentary 0 27.91 20.42 12.88 6.20 25.83 21 Sedentary 0 22.58 23.00 21.75 19.75 31.46 22 Sedentary 0 27.62 20.59 16.74 9.93 26.65 23 Sedentary 0 29.21 18.22 7.55 7.31 30.25 24 Sedentary 0 23.73 15.21 14.95 4.77 23.14 ; RUN; * - create a stacked data set; DATA serge_stacked; SET Serge; KEEP Rat Group DGroup Day Noise Cort; ARRAY d [5] day1-day5; Noise=0; DO Day=1 TO 4; Cort = d[Day]; OUTPUT; END; Noise=1; Day=5; Cort=Day5; OUTPUT; RUN; TITLE Test of Differential Sensitivity to Noise via Exercise; TITLE2 Different habituation curves for each group; PROC MIXED DATA=Serge_Stacked COVTEST METHOD=ML; CLASS Rat; MODEL Cort = DGroup Day Day*Day DGroup*Day DGroup*Day*Day Noise Noise*DGroup / SOLUTION; REPEATED / SUBJECT=Rat TYPE=AR(1) R RCORR; RUN; TITLE2 Same habituation curves for each group; PROC MIXED DATA=Serge_Stacked COVTEST METHOD=ML; CLASS Rat; MODEL Cort = DGroup Day Day*Day Noise Noise*DGroup / SOLUTION; REPEATED / SUBJECT=Rat TYPE=AR(1) R RCORR; RUN;