Programming the statistical procedures from SAS

pairwise comparison of interaction term in ancova (unequal slopes)

Reply
N/A
Posts: 1

pairwise comparison of interaction term in ancova (unequal slopes)

Hello

I have run an ancova to test if the slopes of my regression lines were different and they were. Where I am stuck is that the pairwise comparison of the interaction term isn't being allowed since the independent variable isn't a class variable (lsmeans x*covariate/ adjust=tukey pdiff).

Can anyone help me perform pairwise comparisons on the interaction term please?

Also is there a way to test if each of the different regression lines that are created by the covariate are different from 0 in the ancova design instead of running separate regressions?

Thanks!
Trusted Advisor
Posts: 2,114

Re: pairwise comparison of interaction term in ancova (unequal slopes)

The theory underlying the Tukey test doesn't translate to the case of a continuous covariate. I'm not sure that the others do either (though looked at the original papers of some of them).

You can, in GLM, test the pairwise comparisons using the CONTRAST statements and address multiple comparisons using Bonferroni.

You can use the CONTRAST statement to examine the regression lines as well.

Doc Muhlbaier
Duke
Contributor
Posts: 31

Re: pairwise comparison of interaction term in ancova (unequal slopes)

You can reparameterize the model to easily get what you want.

Let y be response.
Let a be the categorical predictor with 3 levels.
Let x be the continuous predictor.

In this parameterization, the interaction a*x gives you a test of whether slopes are equal:

proc glimmix data=your_data;
class a;
model y = a x a*x / solution;
run;

This parameterization reports the intercept and the slope estimates for the linear regression each level of a:

proc glimmix data=your_data;
class a;
model y = a a*x / noint solution;
/* Pairwise comparison among slopes, with stepdown Bonferroni adjustment */
estimate "Slope A1 versus A2" a*x 1 -1 0,
"Slope A1 versus A3" a*x 1 0 -1,
"Slope A2 versus A3" a*x 0 1 -1
/ adjust=bon stepdown;
run;

Check the GLIMMIX documentation for details, including ADJUST= alternatives. I haven't tested this code so there could be syntax errors.

The book by Milliken and Johnson (Analysis of Messy Data, Vol III: Analysis of Covariance) covers ANCOVA extensively. I think there's also info in Littell et al. (SAS System for Mixed Models, 2nd ed).

Have fun!
Susan In the second parameterization, the fixed-effects solutions will report tests of whether estimates are zero--in other words, whether each intercept or slope is equal to zero.


Message was edited by: Susan
Ask a Question
Discussion stats
  • 2 replies
  • 6425 views
  • 0 likes
  • 3 in conversation