libname mouse "C:\lihao\contrast\analysis"; proc import out=work.SASdata datafile="C:\lihao\contrast\analysis\C57_data.xls" DBMS=EXCEL2000 replace; getnames=yes; proc sort data=SASdata; by gene; run; data micro; set SASdata; array xx(i) C0 C1 C2 C12 C13 C14 C24 C26 C27 C30 C31 C33 C6 C10 C11; do i=1 to 15; y=xx; output; end; keep gene y i; run; data micro;set micro; if i le 3 then do;time='t0';output;end; if 4 le i le 6 then do;time='t1';output;end; if 7 le i le 9 then do;time='t2';output;end; if 10 le i le 12 then do;time='t3';output;end; if 13 le i le 15 then do;time='t4';output;end; RUN; PROC SORT DATA=micro; BY gene time; RUN; ods listing close; ods noresults; ods trace off; ods output overallanova=overallAOV Estimates=Est1; proc glm data=micro; class time; model y=time; estimate 'hr02' time 1 -1 0 0 0; estimate 'hr08' time 1 1 -2 0 0; estimate 'hr16' time 1 1 1 -3 0; estimate 'hr48' time 1 1 1 1 -4; by gene; run; proc sort data=Est1; by gene; run; data hr02 hr08 hr16 hr48;set Est1; if Parameter='hr02' then output hr02; if Parameter='hr08' then output hr08; if Parameter='hr16' then output hr16; if Parameter='hr48' then output hr48; run; quit; data overallAOV; set overallAOV; if 1>= probf >=0; run; ods output Estimates=Est2; proc glm data=micro; class time; model y=time; estimate 'hr2_8' time 0 1 -1 0 0; estimate 'hr816b' time 0 0 1 -1 0; estimate 'hr2_16' time 0 1 1 -2 0; estimate 'hr1648b' time 0 0 0 1 -1; estimate 'hr848b' time 0 0 1 1 -2; estimate 'hr2_48' time 0 1 1 1 -3; by gene; run; proc sort data=Est2; by gene; run; data hr2_8 hr816b hr2_16 hr1648b hr848b hr2_48;set Est2; if Parameter='hr2_8' then output hr2_8; if Parameter='hr816b' then output hr816b; if Parameter='hr2_16' then output hr2_16; if Parameter='hr1648b' then output hr1648b; if Parameter='hr848b' then output hr848b; if Parameter='hr2_48' then output hr2_48; run; ods output Estimates=Est3; proc glm data=micro; class time; model y=time; estimate 'hr8_16' time 0 0 1 -1 0; estimate 'hr1648a' time 0 0 0 1 -1; estimate 'hr8_48' time 0 0 1 1 -2; by gene; run; proc sort data=Est3; by gene; run; data hr8_16 hr1648a hr8_48;set Est3; if Parameter='hr8_16' then output hr8_16; if Parameter='hr1648a' then output hr1648a; if Parameter='hr8_48' then output hr8_48; run; quit; ods output Estimates=Est4; proc glm data=micro; class time; model y=time; estimate 'hr16_48' time 0 0 0 1 -1; by gene; run; proc sort data=Est4; by gene; run; data hr16_48;set Est4; run; quit;