1
$\begingroup$

I'm having trouble understanding how to interpret the output of polynomial model when the lower order term (linear term) is significant, but the quadratic term is not.

For instance, create a random dataset:

set.seed(10)
x <- 0:51
y <- 1 - 0.7*x + 0.1*x^2 + rnorm(length(x), 
          7, 10)
testdf <- data.frame(x,y)
testdf$Treat <- c(0, 1)
testdf$Treat <- as.factor(testdf$Treat)
testdf$y <- ifelse(testdf$Treat == 0 & 
            (testdf$x >= 40 & testdf$x <= 
            75), testdf$y + 20, testdf$y)

Interaction plot:

library(ggplot2) 
ggplot(testdf, aes(x, y, col=Treat)) + 
   geom_point() + geom_smooth() 

interaction plot

Model:

test.mod <- lm(y ~ poly(x,2)*Treat, 
     data=testdf)
summary(test.mod)
Coefficients:
                   Estimate    Std.Error t-value Pr(>|t|)    
(Intercept)          78.913      1.851  42.643  < 2e-16 ***
poly(x, 2)1         524.521     13.382  39.197  < 2e-16 ***
poly(x, 2)2         174.842     13.374  13.073  < 2e-16 ***
Treat1               -4.405      2.617  -1.683  0.09912 .  
poly(x, 2)1:Treat1  -54.606     18.924  -2.885  0.00593 ** 
poly(x, 2)2:Treat1  -11.238     18.914  -0.594  0.55532 

Does this mean that the shapes of the curves do not differ between treatments, and so I should try to visualize (conceptually) the interaction in terms of a linear relationship between the groups? In simple terms, how can I explain this result to someone?

$\endgroup$

1 Answer 1

1
$\begingroup$

In the model you formulated the coefficients at Treat interaction terms (last three coefficients in your output) tell you the differences for the three polynomial terms (of orders 0, 1 and 2) between the Treat == 0 and Treat == 1 groups.

In other words. For an observation from Treat == 0 group your model is:

y = 78.913 + 524.521*x + 174.842*x^2

and for an observation from Treat == 1 group your model is:

y = 78.913 - 4.405 + (524.521-54.606)*x + (174.842-11.238)*x^2

So in either case you have a parabolic model, just with a different shape of the parabola for both groups. The fact that the order 1 interaction term is significant and order 0 and 2 terms not does not have any particular meaning. The only meaning is that you may want to try to estimate another model without these terms and get as a result something like (of course the values of the estimates will change):

y = 78.913 + (524.521-54.606)*x + 174.842*x^2

but still it will be just two parabolas with different shapes for both groups. I don't see here any deeper meaning in the significance of particular order terms.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.