1          ***********************************************;
2          *** Finish times in a 10 K race             ***;
3          *** Data taken from various sites on the    ***;
4          *** internet reporting race results         ***;
5          ***********************************************;
6          options ps=256 ls=80 nocenter nodate nonumber;
7
8          data one; length hometown $ 23 sex $ 3;
9            infile
9        ! "C:\Geaghan\EXST\EXST7015New\Spring2003\SAS\12q-MReg-Polynomial
9        ! Marathons.DAT" missover;
10           TITLE1 'EXST7015: Marathon Footrace Example';
11           input Marathon $ Age Sex $ TIME HomeTown $ 35-57;
12           if age eq 99 then age = .;
13           *(apparently 99 represents missing for 5 PA race participants);
14         *---+----1----+----2----+----3----+----4----+----5----+----6;
15         cards;
NOTE: The infile
      "C:\Geaghan\EXST\EXST7015New\Spring2003\SAS\12q-MReg-Polynomial
      Marathons.DAT" is:
      File Name=C:\Geaghan\EXST\EXST7015New\Spring2003\SAS\12q-MReg-Polynomial
      Marathons.DAT,
      RECFM=V,LRECL=256
NOTE: 6150 records were read from the infile
      "C:\Geaghan\EXST\EXST7015New\Spring2003\SAS\12q-MReg-Polynomial
      Marathons.DAT".
      The minimum record length was 29.
      The maximum record length was 57.
NOTE: The data set WORK.ONE has 6150 observations and 5 variables.
NOTE: DATA statement used:
      real time           0.19 seconds
      cpu time            0.14 seconds
15       !        run;
16         ;
17
18         data two; set one; if marathon = 'VT052002';
NOTE: There were 6150 observations read from the data set WORK.ONE.
NOTE: The data set WORK.TWO has 1490 observations and 5 variables.
NOTE: DATA statement used:
      real time           0.05 seconds
      cpu time            0.05 seconds
19         proc sort data=two; by sex; RUN;
NOTE: There were 1490 observations read from the data set WORK.TWO.
NOTE: The data set WORK.TWO has 1490 observations and 5 variables.
NOTE: PROCEDURE SORT used:
      real time           0.07 seconds
      cpu time            0.07 seconds
20
21         proc mixed data=two method=type1; BY sex;
22            TITLE2 'Quartic model - separate by sex';
23            model time= age age*age age*age*age age*age*age*age
24                  / htype=1 3 DDFM=Satterthwaite solution;
25         run;
NOTE: The PROCEDURE MIXED printed pages 1-2.
NOTE: PROCEDURE MIXED used:
      real time           0.13 seconds
      cpu time            0.12 seconds


EXST7015: Marathon Footrace Example
Quartic model - separate by sex
 
sex=F
 
The Mixed Procedure
 
                  Model Information
Data Set                     WORK.TWO                
Dependent Variable           TIME                    
Covariance Structure         Diagonal                 
Estimation Method            Type 1                  
Residual Variance Method     Factor                  
Fixed Effects SE Method      Model-Based             
Degrees of Freedom Method    Residual                
 
            Dimensions
Covariance Parameters             1
Columns in X                      5
Columns in Z                      0
Subjects                          1
Max Obs Per Subject             527
Observations Used               527
Observations Not Used             0
Total Observations              527
 
Type 1 Analysis of Variance
                              Sum of                                                                      Error
Source               DF      Squares   Mean Square  Expected Mean Square                  Error Term          DF  F Value  Pr > F
Age                   1  4869.217307   4869.217307  Var(Residual) +                      MS(Residual)       522     8.34  0.0040
                                                    Q(Age,Age*Age,Age*Age* Age,Age*Age*Age*Age)
Age*Age               1  3535.615012   3535.615012  Var(Residual) +                      MS(Residual)       522     6.06  0.0142
                                                    Q(Age*Age,Age*Age*Age, Age*Age*Age*Age)
Age*Age*Age           1   262.700283    262.700283  Var(Residual) +                      MS(Residual)       522     0.45  0.5026
                                                    Q(Age*Age*Age,Age*Age*Age*Age)
Age*Age*Age*Age       1     1.495088      1.495088  Var(Residual) + Q(Age*Age*Age*Age)   MS(Residual)       522     0.00  0.9597
Residual            522       304684    583.686674  Var(Residual)                        .                    .      .     .   
 


Covariance Parameter Estimates
Cov Parm     Estimate
Residual       583.69
 
Fit Statistics
-2 Res Log Likelihood          4884.3
AIC (smaller is better)        4886.3
AICC (smaller is better)       4886.3
BIC (smaller is better)        4890.5
 
Solution for Fixed Effects
                               Standard
Effect             Estimate       Error      DF    t Value    Pr > |t|
Intercept            294.52      128.80     522       2.29      0.0226
Age                 -3.6313     14.4413     522      -0.25      0.8016
Age*Age             0.07038      0.5872     522       0.12      0.9046
Age*Age*Age        -0.00010     0.01026     522      -0.01      0.9922
Age*Age*Age*Age     -3.3E-6    0.000065     522      -0.05      0.9597
 
Type 1 Tests of Fixed Effects
                    Num     Den
Effect               DF      DF    F Value    Pr > F
Age                   1     522       8.34    0.0040
Age*Age               1     522       6.06    0.0142
Age*Age*Age           1     522       0.45    0.5026
Age*Age*Age*Age       1     522       0.00    0.9597
 
Type 3 Tests of Fixed Effects
                    Num     Den
Effect               DF      DF    F Value    Pr > F
Age                   1     522       0.06    0.8016
Age*Age               1     522       0.01    0.9046
Age*Age*Age           1     522       0.00    0.9922
Age*Age*Age*Age       1     522       0.00    0.9597


EXST7015: Marathon Footrace Example
Quartic model - separate by sex
 
sex=M
 
The Mixed Procedure
 
                  Model Information
Data Set                     WORK.TWO                
Dependent Variable           TIME                    
Covariance Structure         Diagonal                
Estimation Method            Type 1                  
Residual Variance Method     Factor                  
Fixed Effects SE Method      Model-Based              
Degrees of Freedom Method    Residual                
 
            Dimensions
Covariance Parameters             1
Columns in X                      5
Columns in Z                      0
Subjects                          1
Max Obs Per Subject             963
Observations Used               963
Observations Not Used             0
Total Observations              963
 
Type 1 Analysis of Variance
                              Sum of                                                                      Error
Source               DF      Squares   Mean Square  Expected Mean Square                 Error Term          DF  F Value  Pr > F
Age                   1        18395         18395  Var(Residual) +                      MS(Residual)       958    22.06  <.0001
                                                    Q(Age,Age*Age,Age*Age* Age,Age*Age*Age*Age)
Age*Age               1        13295         13295  Var(Residual) +                      MS(Residual)       958    15.95  <.0001
                                                    Q(Age*Age,Age*Age*Age, Age*Age*Age*Age)
Age*Age*Age           1   170.139126    170.139126  Var(Residual) +                      MS(Residual)       958     0.20  0.6516
                                                    Q(Age*Age*Age,Age*Age*Age*Age)
Age*Age*Age*Age       1   381.349352    381.349352  Var(Residual) + Q(Age*Age*Age*Age)   MS(Residual)       958     0.46  0.4990
Residual            958       798683    833.698204  Var(Residual)                        .                    .      .     .   
 


Covariance Parameter Estimates
Cov Parm     Estimate
Residual       833.70
 
Fit Statistics
-2 Res Log Likelihood          9244.6
AIC (smaller is better)        9246.6
AICC (smaller is better)       9246.6
BIC (smaller is better)        9251.4
 
Solution for Fixed Effects
                               Standard
Effect             Estimate       Error      DF    t Value    Pr > |t|
Intercept            163.89      130.38     958       1.26      0.2091
Age                  8.0558     13.5596     958       0.59      0.5526
Age*Age             -0.3437      0.5108     958      -0.67      0.5012
Age*Age*Age        0.005870    0.008273     958       0.71      0.4782
Age*Age*Age*Age    -0.00003    0.000049     958      -0.68      0.4990
 
Type 1 Tests of Fixed Effects
                    Num     Den
Effect               DF      DF    F Value    Pr > F
Age                   1     958      22.06    <.0001
Age*Age               1     958      15.95    <.0001
Age*Age*Age           1     958       0.20    0.6516
Age*Age*Age*Age       1     958       0.46    0.4990
 
Type 3 Tests of Fixed Effects
                    Num     Den
Effect               DF      DF    F Value    Pr > F
Age                   1     958       0.35    0.5526
Age*Age               1     958       0.45    0.5012
Age*Age*Age           1     958       0.50    0.4782
Age*Age*Age*Age       1     958       0.46    0.4990
 


Modified: August 16, 2004
James P. Geaghan