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).

  • 1
    $\begingroup$ 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.) $\endgroup$
    – whuber
    Commented Oct 30, 2014 at 14:10
  • 2
    $\begingroup$ @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. $\endgroup$ Commented Oct 30, 2014 at 14:48
  • $\begingroup$ @whuber is there somewhere that explains these concepts? $\endgroup$ Commented Oct 31, 2014 at 12:38
  • $\begingroup$ @HermanToothrot While this post is a good number of years after yours, it may provide you with some answers: stats.stackexchange.com/questions/258307/… $\endgroup$
    – Avraham
    Commented Dec 22, 2021 at 19:28


Your Answer

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