I am working on some data that I would like to analyze through a generalized linear mixed model regression and a stepwise backward selection of variables directly on that model.
I use the GLMERSelect R package which seems developed exactly for this purpose. In this function, you specify the response variable (responseVar), model family (fitFamily, binomial in my case) random effect variables (randomStruct), fixedTerms (continous variables) and fixedFactors (categorical variables). You can find a nice usage examples here.
As you can see from the example, for the continuous variables you specify the polynomial order that you should use, in the example they use 2 fixedTerms = list(logHPD.rs=2,logDistRd.rs=2)
My theoretical question is: how do you choose this order for each continuous variable? Why and when would you use a quadratic (order=2) instead of a linear (order=1) or a higher order polynomial?