0

I would like to compare the slopes obtained from a model containing an interaction with a similar model without an interaction.

Here is an example to make my question clearer:

Let's say have the following model:

fit1 <-  lm(Petal.Length ~ Sepal.Width*Species, data = iris)

I would like to compare the slopes of each interaction level with the slope from the following model:

fit2 <-  lm(Petal.Length ~ Sepal.Width+ (1|Species), data=iris)

I would like to obtain a result similar to emmtrends (See for example the response for this question) which calculates the estimates of the slopes which can then be compared. Is this possible or even statistically correct?

cosalofa
  • 11
  • 1

0 Answers0