# Count data with continuous variables

Let's assume one has looked at the occurence of a plant species at different altitude, different temperature and environment. Here are its data:

               Temperature    environment   altitude
plant1        18.1           mud         812
plant2        15.3          field        754
plant3        17.4           mud         213
plant4        15.2          forest       678
plant5        16.6          field        1023
etc...


This guy wants to know if the abondance of plants (number of plants) that one can find is dependent on the three variables. He could run a GLM with poisson distributed errors for the environment variable with these data:

Number of plants     environment
311               forest
102                mud
71               field
etc...


How could he do in order to evaluate the effect of continuous variables on the abondance of plants without having to cut the variable into chunks (Temperature: [10.1:13], [13.1:16], [16.1:19])? What type of model can incorporates continuous and categorial variables in order to makes sense of count data?

Would it make sense to run two Kolmogorov-Smirnov tests on Temperature and altitude to check if these variables are uniformly distributed and a test GLM, poisson distributed errors for environment? But then what happen if it tends to have more mud in high altitude? He would need one model with all variables.

A Poisson GLM can incorporate both continuous and categorical variables (like any regression-type model). Why do you think it could not?

• So I don't quite understand how I could express my data in the model. The response variable should be a count of the number of plants observed in a each category, isn't it? So, we're obliged to express the explanatory variables into categories. Thanks for your help Dec 5, 2013 at 15:35
• No more so then with any other regression model. E.g. if the response was weight and explanatory was height, you would only observe weight at certain specific heights (the ones in the data set). That's how regression works. Dec 5, 2013 at 15:39
• Ok, so my response variable should be made of 0 and 1 only. presence-absence. Correct? Dec 5, 2013 at 15:48
• Now I am confused as to what data you have. Does each plant have a different altitude? If so, you probably want logistic regression. Or do many plants have the same altitude? Then it would be some form of count model. Dec 5, 2013 at 15:51
• Each plant has a different altitude (and different temperature). Many plants live in the same environment. Dec 5, 2013 at 15:53