Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have counted adult butterfly numbers over 3 areas and would like to compare these counts with the percentage heather cover on each of the 3 areas. Is this possible?

My data looks like this (the cover is the average for each area whilst count is the total number of adults observed over 10 days – let me know if this should be an average instead):

$$\begin{array}{c|cc}\rm Area&\rm Cover&\rm Count\\\hline \rm Field\ 1& 53.7& 216\\ \rm Field\ 2&19.5& 2\\ \rm Field\ 3&39.8& 6106\end{array}$$

I suspect from looking at these figures that there probably won't be a relationship, but I would still like to test the relationship nonetheless.

I know that there are specific statistical tests for proportion data and other tests for count data because of the way both count and percentage data behave, but I wonder if there is one that will analyse both? I am using the R software environment.

share|improve this question
When you say 'compare' can you be more specific about the question you're trying to address? – Glen_b Jul 22 '14 at 1:25
So I'm trying to see if there is a relationship between percentage heather cover and adult butterfly abundance. The above figures for cover refer to total heather cover but I will also look separately at whether adult abundance varies as a function of the cover of bell heather and ling heather. Hope that helps. – Natalie Jul 22 '14 at 7:35
"compare A and B" isn't really the same as "see if there's a relationship between A and B". It sounds like you need something like regression, whereas your title suggests something else. – Glen_b Jul 22 '14 at 7:41
up vote 4 down vote accepted

One option would be to do a Poisson regression (glm function in R) with the count as the response variable and the percent cover as the predictor. Linear models don't care much about whether the predictor is a percentage, count, continuous, etc. You could also do a logit transform on the percentage cover if that is the scale that makes more sense to you.

share|improve this answer
And consider glm.nb (negative binomial regression) from the MASS package if the counts are overdispersed, right? – Nick Stauner Jul 21 '14 at 19:10
Thanks a lot guys! I was going to do a glm poisson regression and this puts my mind at ease! Also Nick, I have been taught that if the data is overdispersed then creating a model from the quasipoisson family is one method. Does this sound right? – Natalie Jul 21 '14 at 19:26
I hadn't heard of that option before, so I'm not sure how it compares to NB regression. You may be interested in this article: Quasi-Poisson vs. negative binomial regression: how should we model overdispersed count data? – Nick Stauner Jul 21 '14 at 21:33
Thanks Nick for the article! – Natalie Jul 22 '14 at 7:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.