# Regression models in temperature data

I am quite new to the whole modelling world so I ask your understanding. Can glm models be used for modelling continuous variables? I ask this because I have read that glms are most commonly used to model binary or count data. I want to model temperature using as explanatory variables elevation, slope, aspect, curvature etc. Can I do this using glms? If not, what kind of regression models should i apply?

• Which accounts are you reading? That's bizarre. GLMs certainly include models for continuous responses. Any text covering GLMs should explain that. That said, temperature is a tricky response variable as (arguably) no non-identity link makes sense. GLMs could be still be useful for predicting temperature from topography, however. Mar 15, 2015 at 23:07

Can glm models be used for modelling continuous variables?

Certainly! If that's not obvious from the materials you have, you need to get yourself some better resources.

Indeed ordinary linear regression is a special case of GLMs.

I ask this because I have read that glms are most commonly used to model binary or count data.

That might well be true (until you realize you have to count linear regression as a GLM) -- but in any case "most commonly" certainly indicates something other than "only".

Outside the Gaussian family, Gamma GLMs are reasonably common and other continuous GLMs (such as inverse Gaussian family models) are used.

The table here lists some continuous distributions at the top.

The answer here shows an example of a Gamma GLM (with identity link) being used on some data, with Gaussian linear regression for comparison (neither model is actually quite suitable on physical grounds).

You might like to search the site for more.

I want to model temperature using as explanatory variables elevation, slope, aspect, curvature etc. Can I do this using glms?

Likely yes, depending on other modelling considerations.

If not, what kind of regression models should i apply?

Well, any suitable model that describes your situation, really. That would in large part depend on subject-area knowledge I can't give you. Maybe a Weibull model suits your circumstances better, for example, or some other approach. You'd need to describe what you can about how the physical quantities are understood to impact temperature and how they act together (i.e. potential interactions), as well as things like whether the conditional distribution of temperature might be skew, for example. There may also be dependencies in your data (perhaps over time or space) that need to be considered. Too much is left unsaid for me to offer much additional guidance.

• +1. If you are measuring temperatures in Celsius or Fahrenheit, the zeros are arbitrary and negative values are certainly possible. Even if your data are, or seem to be, all positive, I'd argue that any non-identity link is unphysical. I'd worry about many standard distributions for the same reason. Mar 15, 2015 at 23:51
• @Nick That was the intent of "depending on other modelling considerations" as well as the references to subject area knowledge and how the physical quantities are understood to relate (as well as the specific mention of the unsuitability of the identity-link Gamma example I linked to on physical grounds); since you'd already raised it in your earlier comment, I didn't see the need to pursue it any further than that. The physical considerations are clearly important for temperature models. Mar 15, 2015 at 23:55
• That's very fine by me; equally I thought the point deserved repetition. I have some experience with both climatic and topographic data and worry about these matters. Mar 15, 2015 at 23:57
• @Nick Far more than me, certainly (the experience, that is, not necessarily the worry). No doubt you'd have much to teach me on that score. I expect you could write a more incisive and to the point answer than me, but I worried the question would not be answered. Mar 15, 2015 at 23:58