2

I would like to do an ANCOVA on a set of 2 continuous data set (before and after pill) and one factor with 3 levels (3 pills) Here is the graph of before pill vs after pill with pill taken in colour:.Here is the graph of before pill vs after pill with pill taken in colour

I would like to know how to evaluate the equality of regression slopes for each pill.

I was thinking of an ANOVA like test, which is for equality of means, but here for the slopes, that takes into account variance.

I saw this other option: Testing equality of coefficients from two different regressions, however I would be forced to make a pairwise analysis, and n the case where I have 1000 pills, might not be efficient.

Is there such a test? and how would it be implemented in r?

rannoudanames
  • 740
  • 1
  • 5
  • 20

1 Answers1

1

I can tell from inspection that the slopes are not significantly different but the typical way to test for differences is with the pretest x trmt interaction. Most software allows you to specify trmt as a categorical variable and lets you include pretest x trmt in the model (along with pretest and trmt of course). The old way to do it is with dummy variables.

David Lane
  • 1,194
  • 1
  • 8
  • 9