Why do the t-test and Type III F-test differ for a covariate in a model with an interaction in PROC GLM


In an Analysis of Covariance (ANCOVA) model, the default Type3 test results for the covariate often differ from the t test for that covariate as displayed by the SOLUTION option. This is illustrated in the following example.

        data drugtest;
           input Drug $ X Y @@;
           cards;
        a 11  6  a  8  0  a  5  2  a 14  8  a 19 11
        a  6  4  a 10 13  a  6  1  a 11  8  a  3  0
        d  6  0  d  6  2  d  7  3  d  8  1  d 18 18
        d  8  4  d 19 14  d  8  9  d  5  1  d 15  9
        f 16 13  f 13 10  f 11 18  f  9  5  f 21 23
        f 16 12  f 12  5  f 12 16  f  7  1  f 12 20
        ;
        proc glm;
           class Drug;
           model Y = Drug X Drug*X / solution e3;
           run;
	

In the following Type III SS table, X is highly significant (p<0.0001), while the t test for the X parameter estimate X is less significant (p=0.0019).

This difference is the result of testing different hypotheses. The Type3 F test for X is computed by averaging over the three drugs as shown in the results of the E3 option for X.

The t test for X in the parameter estimates table is a test of X at the reference level of Drug, which is the last level of Drug. The following ESTIMATE statements, when included in the PROC GLM step above, reproduce the F and t test results.

   estimate 'reproduce the F test for X' X 1 Drug*X 0.333333 0.333333 0.333333; 
   estimate 'reproduce the t test for X' X 1 Drug*X 0 0 1;