# Is a g-test appropriate for count data?

I am analyzing an forest ecology experiment where we counted the number of trees in 5 pairs of plots in a forest. One member of each pair was fenced several years ago to exclude deer (exclusion treatment) and the other left so that deer could access it (control). Within a given pair the 2 plots are adjacent to each other and in similar environmental conditions, but the number, size and species of trees in each plot when the experiment began is slightly different.

We are interested in whether excluding deer increases the abundance of trees in the forest. We are particularly interested in whether deer have decreased the number of small trees, either by killing small trees directly or reducing the number of seedlings and sapling that survive to the "small tree" stage. (We consider a tree to be anything taller then 2 meters in height, regardless of how thick in diameter the stem is; a small trees is anything less than 2 cm thick).

We have not, however, followed the fates of individual trees since the experiment began. What we have are counts of the number of trees in each of the ten plots and the size of each tree. The data, pooled across all plots for each of the two treatments and organized into binned size classes, is below.

Because deer only affect the fate of small trees, we would expect that there would be more small trees in our fenced plots. The number of large trees, however, should not be affected because the experiment has not been run long enough to result in a change in the number of large trees. We are therefore hypothesizing that the overall size distribution of trees should be different between the treatments, but that the difference should be driven by smallest size classes.

It has been suggested by my collaborators that I analyze the data as a contingency table using a g-test. An undergraduate working on this project had previously applied a g-test to each row of the table and reported a treatment effect for the two smallest size classes but not the others. This is not, however, a valid use of a g-test because, as pointed out when I posted this initially, each tree is not an independent data point.

I have the following questions about how to analyze this data correctly: 1. Would it be correct to generate a table like the one below for each of the five pairs of plots and apply a goodness of fit test like a g-test? Unfortunately, when broken down into the individual plots many cells of the contingency tables are 0 or < 5. 2. To do such an analysis, do I need to assume an underlying distribution (eg poisson) of the size classes to generate predicted values? 3. Would it make more sense to analyze this type of count data with a generalized linear model with a poisson distribution? I believe this would require analyzing each size class separately. My collaborators would like to keep things as simple as possibly, but I am perfectly comfortable with running a GLM. Again, the data is fairly sparse, which might make this type of analysis difficult.

DATA:

   SIZE_CLASS CONTROL_trt EXCLOSE_trt
1   1_or_less          15          60
2      1_to_2          29          30
3      2_to_3          11          10
4      3_to_5          11          15
5 5_or_larger          45          50

-
No, this approach is not valid, because you have only 10 independent observations, not 400, and there's nothing you can conclude from comparing just two numbers, either. However, you're not asking a question that will help you much. Instead of asking about one invalid form of analysis, why don't you share your full dataset (all 10 numbers won't be hard to post :-) and ask for advice about how to analyze them? –  whuber Aug 18 '12 at 15:54
I am not sure what the g test is. However it seems that you are asking whether or not the 5 plots excluding deer have signifocantly more small trees. This is equivalent to asking if the proportion of small tree in the lots that include deer is less than 1/2. Now if you have a statistical model for how small trees are generated you can do this test. The binomial test would arise if you assume that small trees appear uniformly over the region encompassing the 10 plots. –  Michael Chernick Aug 18 '12 at 15:55
Thanks for the feedback; I have tried to improve the goal of the question. This is only my 2nd question on Cross Validated so I'd appreciate any other comments on how to improve the format of posts to this forum. –  N Brouwer Aug 19 '12 at 1:07