BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
clcl
Calcite | Level 5

does anyone know if when i check for an interaction in the ancova model and i get a significant interaction, can i use the results i recived ?

if not what do i do ???

thanks

CL

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

The presence of an interaction means that the effect of your covariate is not the same in every group (class variable). A comparison of the dependent variable will thus depend on the value of your covariate. What you can do is look at the ancova plot and compare your groups at a specific value of your covariate, as in this example (modified from SAS doc) :

data DrugTest;
   input Drug $ PreTreatment PostTreatment @@;
   datalines;
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 data=DrugTest plots(only)=(ancovaplot(clm));
   class Drug;
   model PostTreatment = Drug|PreTreatment;
   lsmeans Drug / at PreTreatment=15 pdiff;
run;

PG

PG

View solution in original post

3 REPLIES 3
PGStats
Opal | Level 21

The presence of an interaction means that the effect of your covariate is not the same in every group (class variable). A comparison of the dependent variable will thus depend on the value of your covariate. What you can do is look at the ancova plot and compare your groups at a specific value of your covariate, as in this example (modified from SAS doc) :

data DrugTest;
   input Drug $ PreTreatment PostTreatment @@;
   datalines;
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 data=DrugTest plots(only)=(ancovaplot(clm));
   class Drug;
   model PostTreatment = Drug|PreTreatment;
   lsmeans Drug / at PreTreatment=15 pdiff;
run;

PG

PG
clcl
Calcite | Level 5

In your attached example the interaction not significant.

I would like to know if it is a problem to use the ancova results when i get a significant interaction (is it an assumption that the slopes must be the same in order to using the ancova results?)?

thanks

CL

PGStats
Opal | Level 21

You cannot fit an ANCOVA model (model PostTreatment = Drug PreTreatment;) when the interaction is significant. My example shows you what can be done when the interaction IS significant. - PG

PG

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1556 views
  • 3 likes
  • 2 in conversation