Dear Stata Users,
I have 20 variables, all binary coded, and I would like to tabulate the frequencies of every possible pairwise combination of those variables.
For illustration purposes, let's assume I only have 3 variables.
I would like an output table that looks like this:
Var1 Var2 Var3
Var1 52 85 6
Var2 85 63 5
Var3 6 5 34
The main diagonal includes the total number of observations (rows in the data) in which var1 is equal to 1. Also, 85 means that there are 85 rows in the data in which var2 is equal to 1 and var1 is equal to 1.
Is there a mechanical way to acomplish this in Stata?
Thanks!
Ana
I have 20 variables, all binary coded, and I would like to tabulate the frequencies of every possible pairwise combination of those variables.
For illustration purposes, let's assume I only have 3 variables.
I would like an output table that looks like this:
Var1 Var2 Var3
Var1 52 85 6
Var2 85 63 5
Var3 6 5 34
The main diagonal includes the total number of observations (rows in the data) in which var1 is equal to 1. Also, 85 means that there are 85 rows in the data in which var2 is equal to 1 and var1 is equal to 1.
Is there a mechanical way to acomplish this in Stata?
Thanks!
Ana
Comment