How can I calculate confidence intervals and determine statistical significance for each cell in a contigency table? I'm creating a large contigency table to summarise the difference between a bunch of (categorical) demographics across groups.  I would like to know what the confidence intervals are for each cell in the proportional cross-tab, and if the proportion of each demographic group in each sample is statistical different from random. Say I have the following data:
> set.seed(1)
> y <- sample(factor(c("Outcome 1", "Outcome 2", "Outcome 3", "Outcome 4")), 1000, replace = T)
> x1 <- sample(c("Male", "Female"), 1000, replace=T)
> x2 <- sample(c("Employed full-time", "Employed part-time", "Not in labour force", NA), 1000, replace=T)
> 
> table(x1, y)
        y
x1       Outcome 1 Outcome 2 Outcome 3 Outcome 4
  Female       123       126       124       108
  Male         121       150       108       140
> round(prop.table(table(x1, y), 2) * 100, 1)
        y
x1       Outcome 1 Outcome 2 Outcome 3 Outcome 4
  Female      50.4      45.7      53.4      43.5
  Male        49.6      54.3      46.6      56.5
> 
> table(x2, y)
                     y
x2                    Outcome 1 Outcome 2 Outcome 3 Outcome 4
  Employed full-time         57        64        65        77
  Employed part-time         66        80        57        53
  Not in labour force        57        61        51        58
> round(prop.table(table(x2, y), 2) * 100, 1)
                     y
x2                    Outcome 1 Outcome 2 Outcome 3 Outcome 4
  Employed full-time       31.7      31.2      37.6      41.0
  Employed part-time       36.7      39.0      32.9      28.2
  Not in labour force      31.7      29.8      29.5      30.9

How would I compute such a table in R?  I have read papers where Fisher's exact test is used for this purpose, but it seems to me only to be useful for 2 x 2 tables.
 A: Indeed Bonferroni needs to be invoked. Many years ago we proved that it provides a tight upper bound and proposed the M-Test. see:
Fuchs, C. and Kenett, R.S. (1980).  A Test for Detecting Outlying Cells in the Multinomial Distribution and Two-Way Contingency Tables, Journal of the American Statistical Association, 75, pp. 395-398.
Kenett R.S. (1991). Two Methods for Comparing Pareto Charts, Journal of Quality Technology, 23, pp. 27-31.
A: I'm thinking you need to consider a Bonferroni type of approach. 
You want the probability that there's no error overall
P(error)= 1- P(No Error)
Alpha = 1-(1-Alpha)
Now, we're looking at an overall case.. So I'll call that alphaoverall and alphacell is the chances of making an error in any particular cell..
alphaoverall = 1-(1-alphacell)^n
Now, if you want to get z score in terms of an overall alpha..
alphaoverall = 1-(1-alphacell)^n
alphaoverall -1= -(1-alphacell)^n
1-alphaoverall = (1-alphacell)^n
take the nth root
(1-alphaoverall)^(1/n)= 1- alphacell
(1-alphaoverall)^(1/n)-1= - alphacell
1-(1-alphaoverall)^(1/n)=  alphacell
So, what this means, is say you want a 20% error rate for the whole table, plug in .2 for alpha over all, with your number of cell entries as n.. Say you have a 2*3 table, then that's n= 6.
1-(1-.2)^(1/6) =  0.03650752
 ..
You'll have a 2 sided test, so..
Now, cut that .0365 in 2 ,  0.01825376  now find the score that has that much area in the upper tail, and find the appropriate z is 2.09.
My hunch though, is that the errors in each cell might be correlated. Which I think will matter.. If you don't have an error in one cell, it makes it less likely to have an error in the next cell. Doesn't it?  Come to think of it, if you have a 2x2 table, and one point estimate is very close to the true parameter, the others would have to be very close as well..
