/*import excel file*/ PROC IMPORT OUT= work.seuss DATAFILE= "C:\Users\stevensonja2\Desktop\seuss\seuss.xlsx" DBMS=xlsx REPLACE; RUN; data seuss1; set seuss; if Year >=1930 and year <=1939 then decade=1930; if Year >=1940 and year <=1949 then decade=1940; if Year >=1950 and year <=1959 then decade=1950; if Year >=1960 and year <=1969 then decade=1960; if Year >=1970 and year <=1979 then decade=1970; if Year >=1980 and year <=1989 then decade=1980; if Year >=1990 and year <=1999 then decade=1990; run; data seuss1; set seuss1; if Year >=1930 and year <1957 then time=1; if Year >=1957 and year <=1999 then time=2; run; DATA Seuss1; set Seuss1; If time = 1 and Type = "literacy" and Genre = "rhyme" then new= "1LR"; If time= 1 and Type= "literacy" and Genre= "prose" then new= "1LP"; If time= 1 and Type= "moral" and Genre= "rhyme" then new= "1MR"; If time= 1 and Type= "moral" and Genre= "prose" then new= "1MP"; If time= 2 and Type= "literacy" and Genre= "rhyme" then new= "2LR"; If time= 2 and Type= "literacy" and Genre= "prose" then new= "2LP"; If time= 2 and Type= "moral" and Genre= "rhyme" then new= "2MR"; If time= 2 and Type= "moral" and Genre= "prose" then new= "2MP"; run; proc anova data = seuss1; class decade; model T_N = decade; ods graphics on; run; proc anova data = seuss1; class time; model T_N = time; ods graphics on; run; Proc GLM data=Seuss1; Class new; MODEL T_N = new; MEANS new / HOVTEST=LEVENE WELCH; RUN; /*NORMALITY TEST:*/ PROC GLM DATA= Seuss1; CLASS Time Genre Type; MODEL T_N=Time|Genre|Type; LSMEANS Time Genre Type /STDERR OUT=ADJMEANS; OUTPUT OUT= norm_test r=resid p=predicted; RUN; Proc univariate data=norm_test normal plot; Var T_N; Run; Proc Mixed; Class Time Type Genre; Model T_N=Time|Type|Genre; LSmeans Time|Type|Genre / pdiff adjust=tukey; Run;