# How to determine if GLM quadratic term should be set up orthogonal or non-orthogonal

I am setting up a GLM in R where I have only one predictor variable and its quadratic form. I understand that in R I have 2 options.

glm(y~x+I(x^2), family = gaussian) # non-orthogonal polynomial
glm(y~poly(x,2), family = gaussian) # orthogonal


How do I determine the best way of fitting the data? Is there a preferred choice because x^2 is correlated to x, and what are its implications?

All the variables involved are continuous, x is temperature and y is length and each sample has a unique pair (x,y).

• What is the purpose of this GLM? Prediction of future values? Interpretation of the coefficients? Something else? (The answer depends on the purpose: for instance, if prediction is the only concern, both models are perfectly equivalent, so there is little to choose among them.)
– whuber
Commented Oct 30, 2014 at 14:10
• @whuber I want to find if temperature drives length and if there is any relationship that at certain temperatures I can expect a certain length of a plant/animal. The field is ecology. Commented Oct 30, 2014 at 14:48
• @whuber is there somewhere that explains these concepts? Commented Oct 31, 2014 at 12:38
• @HermanToothrot While this post is a good number of years after yours, it may provide you with some answers: stats.stackexchange.com/questions/258307/… Commented Dec 22, 2021 at 19:28