Dear Statalisters,
I need your help in creating summary table like the one attached below.
My data composed of two variables representing different groups (group1, group2) and one variable representing continues measure of the groups.
I would like to create a table that the first column presents the mean of the measure for every two groups (in group1 and group2) and a second and third column for any of the groups regardless of the other group. The desired table:
I find it too difficult to produce such a table.
didn't produce exactly the desired results mainly because of the large number of subgroups
Many thanks for your help!
I need your help in creating summary table like the one attached below.
My data composed of two variables representing different groups (group1, group2) and one variable representing continues measure of the groups.
Code:
group1 group2 x 1. a b 223 2. a b 332 3. a b 290 4. a c 223 5. a c 446 6. a c 223 7. a c 446 8. a d 669 9. a d 446 10. a d 669 11. b c 223 12. b c 669 13. b c 446
Group (1-2) | Mean group (1-2) | Mean (1) | Mean (2) |
a-b | 281.7 | 396.7 | 363.8 |
a-c | 334.5 | 396.7 | 382.3 |
a-d | 594.7 | 396.7 | 594.7 |
b-c | 446.0 | 363.8 | 382.3 |
I find it too difficult to produce such a table.
Code:
tab group1 group2, s(x) nost nof or table group1 group2, c(mean x) col row
Many thanks for your help!
Comment