# Analysis method for count data with unequal sample sizes and categorical predictors?

I have a problem I've been going over and over for months to find the right statistical analysis method. I'm planning to execute the analysis in R, so any mention of appropriate packages is also appreciated. I appreciate any advice anyone can offer. Here's an analogy to my data.

Consider that I have 5 colleges. My hypothesis is that one particular college has awarded more degrees than the other colleges. So I want to test whether the number of degrees awarded by the different colleges differs significantly. My data includes 3 data sets as follows:

1)The total number of degrees earned by students from each college, since the opening of each respective college. This is not a random sample, but the actual count. All colleges have different opening dates, so they differ in age. I do have the age of each college if it turns out to be relevant. This data includes second, third, and fourth degrees earned by individual students in the count. So the data includes two columns (college name, and number of degrees awarded), and 5 rows (one for each college).

2)The number of degrees per student per school. I have the list of about 5000 students in the total data set, and the number of degrees each student obtained at each school. Some students attended more than one of the schools, and many earned degrees from more than one school. Every degree ever awarded by these five colleges is represented in this data set as well. This data set does not include students who attended, but never earned a degree at these five colleges. This data set has six columns (one for student ID, and five for college name), and about 5000 rows (one for each student). The totals for each college column are equal to the values in the first data set.

3)The total number of students attending each school over the 30 year period, including those who did not earn a degree. The total number of students, of course, varies at each school. So five rows (one for each college) and two columns (college name, and total students attended in the history of the college).

So I have count data with unequal sample sizes. My categorical predictor needs to be the college, as that's what I'm interested in addressing.

I've considered different types of regression models, but I'm not sure if these would be most appropriate. For a regression model I guess my response would simply be the number of degrees for each school. Or maybe the proportion of degrees with respect to the total students per school. Would this be sufficient to correct for the unequal sample sizes?

Any thoughts on which regression model would be most appropriate? Binomial doesn't work, because I need to take into account students with more than one degree, so it's not a binomial response. I'm not sure what type of distribution should be assumed, as picking one to test against seems very arbitrary to me.

Would some type of contingency table be more appropriate?

Thanks in advance for any suggestions you can offer.

• I think that I understand your data. You have three datasets. The first has two columns and five rows: college name and # advanced degrees awarded. There is one row for each college. The second summarizes data from your sample of students, allowing you to ask questions of the form "how many degrees (not just advanced degrees) did student $x$ earn from college $y$?". The third dataset is similar to the first: five rows and two columns. The columns are college name and # students enrolled (regardless of whether they ever earned any degrees from that college). Is this correct? Jan 27 '14 at 15:25
• I am unclear about your hypotheses: "I want to test whether any one particular college results in their students earning a significantly higher number of advanced degrees." I assume you mean a higher rate of advanced degrees, but I am still not sure about either the numerator or the denominator. Suppose that student $x$ enrolls at college $y_1$, transfers to $y_2$ before graduating, and then graduates with two degrees from $y_2$. Does $x$ count as one of $y_1$'s students? If so, does $x$'s subsequent graduate degree count in $y_1$'s numerator? These little details need to be spelled out. Jan 27 '14 at 15:34
• Yes this is correct. Except that all degrees are the same. So the second dataset has about 5000 rows (students), and breaks down the number of advanced degrees per student per school in the five columns. I'll reword to be consistent with the nomenclature of "advanced degrees". Thanks.
– Jeff
Jan 27 '14 at 15:36
• Regarding the rate or number, I'm not interested in degrees per unit of time, just the total. Actually my analogy be a better fit if I included students since each college opened, with each college opening at different times. On the next detail. So student x would count in the total count of students for both colleges, but only the college giving the two degrees would gain 2 degrees in the data.
– Jeff
Jan 27 '14 at 15:39
• Sorry - by "rate" I meant "degrees per student", rather than just the aggregate number of degrees conferred. Jan 27 '14 at 15:41

If you are interested in the proportion of students who earn at least one degree from school $y$, among those students who enroll at school $y$, then logistic regression is probably the best way to go. The only snag is that you would have to reduce the numerator for each school to exclude those people who earned more than one degree from that school. That is not difficult: the number of over-counts can be easily computed from your second table.

If the question of interest really does require you to count individuals earning multiple degrees from one college with corresponding multiplicity, then you are right that a binomial based method is inappropriate. In this case, I think that so long as none of the cells are underpopulated a $\chi^{2}$ goodness of fit test should work, using the $2\times 5$ contingency table generated directly from your first and third datasets.

(From the way that you have phrased your hypotheses, I don't think that the possibility of individuals moving between colleges is really relevant to the question of interest.)

However, if you want to know whether admission to college $y$ is associated with the completion of any advanced degree(s), whether at $y$ or not, then I think that you have a problem. You have no way of linking students who attend $y$ but do not graduate there to the schools at which they subsequently graduate from elsewhere. If such students are very rare - i.e., if the vast majority of students who enroll at each college do subsequently graduate from that college, then this might not matter much. But otherwise, I think that this version of the question cannot be answered from the data you have.

• Thank you Uniwisdom, for your response and careful attention to the details here.
– Jeff
Jan 27 '14 at 18:23
• My data is such that every degree awarded is important to the question of interest. I emphasized that students can move between schools just to be clear that an individual can contribute to the total response (number of degrees awarded) for multiple predictors. In any case, I need to have every degree in the analysis.
– Jeff
Jan 27 '14 at 18:41
• A Chi square might be the way to go then. Your last paragraph is true. Fortunately I don't need to answer a question as such. For some reason I keep thinking about standardizing the response (number of degrees awarded) to both the total number of students per school and the time that each school has existed. Then running some sort of Glm, but I can't settle on an appropriate distribution for my data. I'll have to give it some more thought, but the simple Chi Square, assuming a uniform distribution, might be the way to go. Thanks again.
– Jeff
Jan 27 '14 at 18:41