I have a variable `young` that is equal to 1 if a participant is less than 25 years old. I then have a list of of each participant's favorite ice cream flavor (everyone has to choose among 25 flavors and can only make one choice). I would like to test if the distribution of tastes of flavors differs by age, using the `young` variable. A sample of the data below.
id young flavor
1 1 1
2 1 1
3 0 5
4 1 11
5 0 7
I have been using a `ttest` for each flavor, however, I a 25X2 chi2 test seems more appropriate, but I do not know how to handle this in Stata.
id young flavor
1 1 1
2 1 1
3 0 5
4 1 11
5 0 7
I have been using a `ttest` for each flavor, however, I a 25X2 chi2 test seems more appropriate, but I do not know how to handle this in Stata.
Comment