/* Analysis of Vocabulary Data - Bock p. 454 "Data are drawn from test results on file in the Records Office of the Laboratory School of the University of Chicago. They consist of scores, obtained from a cohort of pupils at the eigth through eleventh gade level on alternative forms of the vocabulary section of the Cooperative Reading Tests." There are 64 students in all, 36 male, 28 female (ordered). */ OPTIONS NOCENTER FORMCHAR = "|----|+|---+="; TITLE1 'Trend in Vocabulary across Grades'; DATA VOCABDAT; INPUT SUBJECT VOCAB1 VOCAB2 VOCAB3 VOCAB4 ; DATALINES; 1 1.75 2.60 3.76 3.68 2 0.90 2.47 2.44 3.43 3 0.80 0.93 0.40 2.27 4 2.42 4.15 4.56 4.21 5 -1.31 -1.31 -0.66 -2.22 6 -1.56 1.67 0.18 2.33 7 1.09 1.50 0.52 2.33 8 -1.92 1.03 0.50 3.04 9 -1.61 0.29 0.73 3.24 10 2.47 3.64 2.87 5.38 11 -0.95 0.41 0.21 1.82 12 1.66 2.74 2.40 2.17 13 2.07 4.92 4.46 4.71 14 3.30 6.10 7.19 7.46 15 2.75 2.53 4.28 5.93 16 2.25 3.38 5.79 4.40 17 2.08 1.74 4.12 3.62 18 0.14 0.01 1.48 2.78 19 0.13 3.19 0.60 3.14 20 2.19 2.65 3.27 2.73 21 -0.64 -1.31 -0.37 4.09 22 2.02 3.45 5.32 6.01 23 2.05 1.80 3.91 2.49 24 1.48 0.47 3.63 3.88 25 1.97 2.54 3.26 5.62 26 1.35 4.63 3.54 5.24 27 -0.56 -0.36 1.14 1.34 28 0.26 0.08 1.17 2.15 29 1.22 1.41 4.66 2.62 30 -1.43 0.80 -0.03 1.04 31 -1.17 1.66 2.11 1.42 32 1.68 1.71 4.07 3.30 33 -0.47 0.93 1.30 0.76 34 2.18 6.42 4.64 4.82 35 4.21 7.08 6.00 5.65 36 8.26 9.55 10.24 10.58 37 1.24 4.90 2.42 2.54 38 5.94 6.56 9.36 7.72 39 0.87 3.36 2.58 1.73 40 -0.09 2.29 3.08 3.35 41 3.24 4.78 3.52 4.84 42 1.03 2.10 3.88 2.81 43 3.58 4.67 3.83 5.19 44 1.41 1.75 3.70 3.77 45 -0.65 -0.11 2.40 3.53 46 1.52 3.04 2.74 2.63 47 0.57 2.71 1.90 2.41 48 2.18 2.96 4.78 3.34 49 1.10 2.65 1.72 2.96 50 0.15 2.69 2.69 3.50 51 -1.27 1.26 0.71 2.68 52 2.81 5.19 6.33 5.93 53 2.62 3.54 4.86 5.80 54 0.11 2.25 1.56 3.92 55 0.61 1.14 1.35 0.53 56 -2.19 -0.42 1.54 1.16 57 1.55 2.42 1.11 2.18 58 -0.04 0.50 2.60 2.61 59 3.10 2.00 3.92 3.91 60 -0.29 2.62 1.60 1.86 61 2.28 3.39 4.91 3.89 62 2.57 5.78 5.12 4.98 63 -2.19 0.71 1.56 2.31 64 -0.04 2.44 1.79 2.64 ; PROC MEANS; /* set up the data for the univariate repeated measures ANOVA */ DATA UNIDATA; SET VOCABDAT; ARRAY V(4) VOCAB1--VOCAB4; DO TIME = 1 TO 4; VOCAB = V(TIME); OUTPUT; END; DROP VOCAB1--VOCAB4; RUN; TITLE2 'Univariate Repeated Measures Analysis'; PROC GLM; CLASS TIME SUBJECT; MODEL VOCAB = SUBJECT TIME ; OUTPUT OUT = NEW P=YHAT R=RESID; RUN; TITLE2 'Univariate Repeated Measures Analysis with orthogonal polynomials'; PROC GLM DATA=UNIDATA; CLASS TIME SUBJECT; MODEL VOCAB = SUBJECT TIME ; CONTRAST 'Linear' TIME -3 -1 1 3; CONTRAST 'Quad' TIME 1 -1 -1 1; CONTRAST 'Cubic' TIME -1 3 -3 1; ESTIMATE 'Linear' TIME -3 -1 1 3; ESTIMATE 'Quad' TIME 1 -1 -1 1; ESTIMATE 'Cubic' TIME -1 3 -3 1; RUN; TITLE2 'Univariate Repeated Measures Analysis with orthonormal polynomials'; PROC GLM DATA=UNIDATA; CLASS TIME SUBJECT; MODEL VOCAB = SUBJECT TIME ; CONTRAST 'Linear' TIME -.67082 -.22361 .22361 .67082; CONTRAST 'Quad' TIME .5 -.5 -.5 .5; CONTRAST 'Cubic' TIME -.22361 .67082 -.67082 .22361; ESTIMATE 'Linear' TIME -.67082 -.22361 .22361 .67082; ESTIMATE 'Quad' TIME .5 -.5 -.5 .5; ESTIMATE 'Cubic' TIME -.22361 .67082 -.67082 .22361; RUN; TITLE2 'Residual Analysis'; PROC UNIVARIATE NORMAL PLOT DATA=NEW; VAR RESID; PROC PLOT DATA =NEW; PLOT RESID*YHAT; RUN;Trend in Vocabulary across Grades ****************** * OUTPUT * ****************** The MEANS Procedure Variable N Mean Std Dev Min Max -------------------------------------------------------------- SUBJECT 64 32.5000 18.6190 1.00 64.00 VOCAB1 64 1.1372 1.8890 -2.19 8.26 VOCAB2 64 2.5417 2.0849 -1.31 9.55 VOCAB3 64 2.9883 2.1688 -0.66 10.24 VOCAB4 64 3.4716 1.9255 -2.22 10.58 -------------------------------------------------------------- Trend in Vocabulary across Grades Univariate Repeated Measures Analysis The GLM Procedure Class Level Information Class Levels Values TIME 4 1 2 3 4 SUBJECT 64 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 Number of observations 256 Dependent Variable: VOCAB Sum of Source DF Squares Mean Square F Value Pr > F Model 66 1067.941641 16.180934 19.74 <.0001 Error 189 154.941734 0.819798 Corrected Total 255 1222.883375 R-Square Coeff Var Root MSE VOCAB Mean 0.873298 35.72143 0.905427 2.534688 Source DF Type I SS Mean Square F Value Pr > F SUBJECT 63 873.6032250 13.8667179 16.91 <.0001 TIME 3 194.3384156 64.7794719 79.02 <.0001 Source DF Type III SS Mean Square F Value Pr > F SUBJECT 63 873.6032250 13.8667179 16.91 <.0001 TIME 3 194.3384156 64.7794719 79.02 <.0001 Trend in Vocabulary across Grades Univariate Repeated Measures Analysis with orthogonal polynomials The GLM Procedure ********************* same output as before ********************* Contrast DF Contrast SS Mean Square F Value Pr > F Linear 1 177.5931003 177.5931003 216.63 <.0001 Quad 1 13.5792250 13.5792250 16.56 <.0001 Cubic 1 3.1660903 3.1660903 3.86 0.0509 Standard Parameter Estimate Error t Value Pr > |t| Linear 7.44968750 0.50614892 14.72 <.0001 Quad -0.92125000 0.22635668 -4.07 <.0001 Cubic 0.99468750 0.50614892 1.97 0.0509 Trend in Vocabulary across Grades Univariate Repeated Measures Analysis with orthonormal polynomials The GLM Procedure ********************* same output as before ********************* Contrast DF Contrast SS Mean Square F Value Pr > F Linear 1 177.5928882 177.5928882 216.63 <.0001 Quad 1 13.5792250 13.5792250 16.56 <.0001 Cubic 1 3.1663024 3.1663024 3.86 0.0508 Standard Parameter Estimate Error t Value Pr > |t| Linear 1.66580128 0.11317844 14.72 <.0001 Quad -0.46062500 0.11317834 -4.07 <.0001 Cubic 0.22242654 0.11317844 1.97 0.0508 Trend in Vocabulary across Grades Residual Analysis The UNIVARIATE Procedure Variable: RESID Moments N 256 Sum Weights 256 Mean 0 Sum Observations 0 Std Deviation 0.7794964 Variance 0.60761464 Skewness 0.18381468 Kurtosis -0.0568406 Uncorrected SS 154.941734 Corrected SS 154.941734 Coeff Variation . Std Error Mean 0.04871853 Basic Statistical Measures Location Variability Mean 0.00000 Std Deviation 0.77950 Median 0.00406 Variance 0.60761 Mode -0.36203 Range 4.61266 Interquartile Range 1.12430 Tests for Location: Mu0=0 Test -Statistic- -----p Value------ Student's t t 0 Pr > |t| 1.0000 Sign M 1 Pr >= |M| 0.9502 Signed Rank S -194 Pr >= |S| 0.8704 Tests for Normality Test --Statistic--- -----p Value------ Shapiro-Wilk W 0.994155 Pr < W 0.4268 Kolmogorov-Smirnov D 0.041833 Pr > D >0.1500 Cramer-von Mises W-Sq 0.049298 Pr > W-Sq >0.2500 Anderson-Darling A-Sq 0.341953 Pr > A-Sq >0.2500 Quantiles (Definition 5) Quantile Estimate 100% Max 2.7106250 99% 1.8979688 95% 1.3006250 90% 1.0079687 75% Q3 0.5389844 50% Median 0.0040625 25% Q1 -0.5853125 10% -0.9870312 5% -1.2395312 1% -1.7595313 0% Min -1.9020313 Extreme Observations ------Lowest----- -----Highest----- Value Obs Value Obs -1.90203 94 1.64062 36 -1.78187 20 1.72891 115 -1.75953 82 1.89797 134 -1.61859 75 2.11797 146 -1.40953 178 2.71062 84 Stem Leaf # Boxplot 26 1 1 0 24 22 20 2 1 | 18 0 1 | 16 43 2 | 14 2461 4 | 12 260448 6 | 10 11260023367 11 | 8 111245778890337 15 | 6 015556678023344488 18 | 4 134445791111445899 18 +-----+ 2 000233366667888900011256699 27 | | 0 0112334566788112333345588 25 *--+--* -0 9998433188776665332211110 25 | | -2 9876655433210076431000 22 | | -4 98887776442295552 17 +-----+ -6 99887662176432210 17 | -8 944432211865544422111 21 | -10 877665073211 12 | -12 95421974 8 | -14 1 1 | -16 862 3 | -18 0 1 | ----+----+----+----+----+-- Multiply Stem.Leaf by 10**-1 Normal Probability Plot 2.7+ * | | | * | *++ | **+ | *** | *** | *** | **** | *** | *** | **** | *** | **** | *** | *** | +*** | ***** | **** | ****+ | *+++ |* **+ -1.9+*+ +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2 Plot of RESID*YHAT. Legend: A = 1 obs, B = 2 obs, etc. | | 3.0 + | | | A | 2.5 + | | | | A 2.0 + | A | | A | A 1.5 + A A | AA A | A A A A | A A A | AAA B A 1.0 + A B A | AA A B AA A A | A A A A A A A | A A BCA A A A A A | A AA A AA A 0.5 + AAA B B A | A A BAAA A A A | BA AA ABAB B A B | BAAA AA AAA A | AA AB AA B A B A A 0.0 + A ABB AAAC A AA A A | A A AA A A A A B A | A AA B AB A A | AA A C A A B | A A A AA B A -0.5+ A A A B A A | A AAA B AA AA A B A | A A AA | A AA AAA A BA D A A | A AA AAA A AA A A -1.0+ A A A A A | A A | A A A A A AA | A B A A A | A A -1.5+ A | A A | A -2.0+ | +--------+--------+--------+--------+--------+--------+--------+- -2 0 2 4 6 8 10 12 YHAT