How to write out glm equation when there is a relationship between the independent variables? We measured species abundance and corresponding temperature, rainfall, and pH across 500 sites. I want to run a regression measuring species abundance to abiotic variables. I am having a hard time specifying the formulae because I am not sure how best to visualize the graph to eyeball what's a good fit. For instance, temperature and rainfall have a quadratic relationship (temp ~ rainfall + rainfall^2). I don't find a significant relationship between pH and temp, pH and rainfall. Therefore, I am not sure how best to start out writing the relationship between the independent vairables and then testing it.
There are five species abundances (i.e. count data) I have measured that are repeated across sites. But right now, I am looking at the relationship of each species on the environmental variables alone.
Right now the basic model I have is (As written in R)
lm(species.abundance ~ temp * rainfall * pH)
Any suggestions on how to proceed?
 A: In real-world data there almost always are associations among the predictor variables. Those associations don't necessarily have much to do with how you set up your model. You construct your model based on your knowledge of the subject matter and how you expect those predictors to be associated with your outcome.
If you expect that the association of temp with outcome in a case depends on the corresponding combination of pH and rainfall values then your full interaction model makes sense. If you think that each of temp, pH, and rainfall has an association with outcome that is independent of the particular values of the other 2 predictors, then you might consider no interaction terms at all. If you think that the effect of temp depends on pH and rainfall individually but not on the combination of pH and rainfall, then two-way interactions might suffice.
Associations among those predictors themselves will show up in things like larger standard errors of the regression coefficients. Focus on how you expect the predictors, individually or in combination, to be related to outcome. Also, recognize that simple inclusion of linear terms for continuous predictors like these might not work well; regression splines allow the data to illustrate nonlinear associations of predictors with outcome.
For further guidance on setting up regression models, look at Frank Harrell's course notes or book. Look particularly at Chapter 4 on general strategies about how to use your data efficiently, and the sections on regression splines (including ways to simplify evaluation of interactions among spline-modeled predictors).
