Skip to content
Prev 361821 / 398506 Next

Obtaining and extracting cells sample in cross-tabulation

I don't know exactly what you mean, but perhaps this will get you started:

This:
subset(Data, X4==1 & X5==1, select=c(X1, X2, X3))
will extract the continuous variables in the cross-tabulation cell for
which X4 and X5 are both equal to one. Similar commands will extract the
other cells.

Of course, this gets tedious if your categorical variables have more than
two levels.

-Don