# Goodness of fit using frequency tables with low counts

I have two frequency tables, one representing observed data and one representing modeled data.

I am looking for a Goodness of Fit measure, checking whether the model data fits the observed data.

Problem is, my counts are rather small (most are smaller than 5), and so Pearson Goodness of Fit fails to operate on these data sets (I am using R).

R reports the following:

X-squared = Inf, df = 534, p-value < 2.2e-16


Should I use another Goodness of Fit measure? Any suggestions?

The model contains frequencies of "topics" that are associated with "documents" read by users in the last month.

The observed data contains "topics" that are associated with "documents" read by users in the last day.

(If "documents" are Music CDs, "topics" are musical Genres, for example)

I am trying to understand if the model (data over time) fits the observed data (data of last day). If the model fits the observed data, it should mean that users stay around the same "topics" (keep listening to the same musical genres).

• What variables are these? df = 534 indicates a 2x268 table. What variable has 268 categories? Can these be combined somehow? There are exact tests, but with such a large table they may take a very long time to run. – Peter Flom Sep 6 '13 at 13:44
• The data represents topical labeling of documents. – Ido Tamir Sep 6 '13 at 14:09
• Can you tell us more about what you are trying to do? this post on my blog may help – Peter Flom Sep 6 '13 at 14:13
• Provided some more info - hope it helps. – Ido Tamir Sep 6 '13 at 15:05
• Your expecteds simply seem to be observeds from a different sample. Since your other, 'sample' sample has observeds in different cells to that earlier sample, you will automatically get a chi-square of infinity. This seems to be simply caused by your error of treating something that isn't a population as a population. If it really is your population, the chi-square of infinity is exactly right, because you have observed an infinitely unlikely event (an event of probability zero occurred). My suggestion is instead to treat both samples as samples and test them for equality of distribution. – Glen_b Sep 7 '13 at 0:31