Results: SleepTheHardWay.sas

Student's Sleep data with a classical mixed model

Data in multivariate format

The PRINT Procedure

Data Set WORK.BEDTIME

Obs patient xsleep1 xsleep2 sleepdif
1 1 0.7 1.9 1.2
2 2 -1.6 0.8 2.4
3 3 -0.2 1.1 1.3
4 4 -1.2 0.1 1.3
5 5 -0.1 -0.1 0.0
6 6 3.4 4.4 1.0
7 7 3.7 5.5 1.8
8 8 0.8 1.6 0.8
9 9 0.0 4.6 4.6
10 10 2.0 3.4 1.4

Student's Sleep data with a classical mixed model

Matched t-test

The MEANS Procedure

The MEANS Procedure

Summary statistics

Variable N Mean Std Dev t Value Pr > |t|
xsleep1
xsleep2
sleepdif
10
10
10
0.7500000
2.3300000
1.5800000
1.7890097
2.0022487
1.2299955
1.33
3.68
4.06
0.2176
0.0051
0.0028

Student's Sleep data with a classical mixed model

Data in univariate format

The PRINT Procedure

Data Set WORK.UNISLEEP

Obs Subject Drug ExtraSleep
1 1 1 0.7
2 1 2 1.9
3 2 1 -1.6
4 2 2 0.8
5 3 1 -0.2
6 3 2 1.1
7 4 1 -1.2
8 4 2 0.1
9 5 1 -0.1
10 5 2 -0.1
11 6 1 3.4
12 6 2 4.4
13 7 1 3.7
14 7 2 5.5
15 8 1 0.8
16 8 2 1.6
17 9 1 0.0
18 9 2 4.6
19 10 1 2.0
20 10 2 3.4

Student's Sleep data with a classical mixed model

Repeated measures ANOVA: Compare t = 4.06, p = 0.0028

The GLM Procedure

The GLM Procedure

Data

Class Levels

Class Level Information
Class Levels Values
Subject 10 1 2 3 4 5 6 7 8 9 10
Drug 2 1 2

Number of Observations

Number of Observations Read 20
Number of Observations Used 20

Student's Sleep data with a classical mixed model

Repeated measures ANOVA: Compare t = 4.06, p = 0.0028

The GLM Procedure

Dependent Variable: ExtraSleep

Analysis of Variance

ExtraSleep

Overall ANOVA

Source DF Sum of Squares Mean Square F Value Pr > F
Model 10 70.56000000 7.05600000 9.33 0.0013
Error 9 6.80800000 0.75644444    
Corrected Total 19 77.36800000      

Fit Statistics

R-Square Coeff Var Root MSE ExtraSleep Mean
0.912005 56.47650 0.869738 1.540000

Type I Model ANOVA

Source DF Type I SS Mean Square F Value Pr > F
Subject 9 58.07800000 6.45311111 8.53 0.0019
Drug 1 12.48200000 12.48200000 16.50 0.0028

Type III Model ANOVA

Source DF Type III SS Mean Square F Value Pr > F
Subject 9 58.07800000 6.45311111 8.53 0.0019
Drug 1 12.48200000 12.48200000 16.50 0.0028

Student's Sleep data with a classical mixed model

Repeated measures ANOVA: Compare t = 4.06, p = 0.0028

The GLM Procedure

Random Effects Analysis

Model Expected Mean Squares

Source Type III Expected Mean Square
Subject Var(Error) + 2 Var(Subject)
Drug Var(Error) + Q(Drug)

Student's Sleep data with a classical mixed model

Repeated measures ANOVA: Compare t = 4.06, p = 0.0028

The GLM Procedure

Tests of Hypotheses for Mixed Model Analysis of Variance

Dependent Variable: ExtraSleep

ExtraSleep

Type III Model ANOVA

Source DF Type III SS Mean Square F Value Pr > F
Subject 9 58.078000 6.453111 8.53 0.0019
Drug 1 12.482000 12.482000 16.50 0.0028
Error: MS(Error) 9 6.808000 0.756444