Programming the statistical procedures from SAS

ancova

Accepted Solution Solved
Reply
Contributor
Posts: 45
Accepted Solution

ancova

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


Accepted Solutions
Solution
‎01-06-2013 01:28 PM
Respected Advisor
Posts: 4,745

Re: ancova

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


All Replies
Solution
‎01-06-2013 01:28 PM
Respected Advisor
Posts: 4,745

Re: ancova

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
Contributor
Posts: 45

Re: ancova

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

Respected Advisor
Posts: 4,745

Re: ancova

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

PG
🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

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