[R] How to solve empty cells in the contingency table?
David.Duffy at qimr.edu.au
Fri Jun 27 06:53:29 CEST 2008
> Hi,Dear all R experts,
> I am trying to do the 2-way contingency table analysis by fitting
> the loglinear models. However, I found my table has several empty
> cells which are theoretically missing values.I have no idea of how
> to solve them coz we cannot compute the simulated p-value with zero
> marginals.Does someone have some suggestions? Please help me out,
> thanks a lot!
One approach: if they are *structural zeroes*,
tab <- as.data.frame(table(x,y))
then use the exactLoglinTest package's mcexact function
More information about the R-help