Hello,
Following my previous topic 'Two way table' (and thanks again for Nick and Clyde for their help) I'm trying to modify the table under different scenario. I would like to build a table like attached below.
The first column in the table present the mean of group1 and group2 and the following columns present the mean of group1 or group2 after taking out the members belong to group1 and group2. In other words, calculate the mean without the observations of the other group.
Is there a simple way to do that?
My data composed of two variables representing different groups (group1, group2) and one variable representing continues measure of the groups.
Thanks and regards
Following my previous topic 'Two way table' (and thanks again for Nick and Clyde for their help) I'm trying to modify the table under different scenario. I would like to build a table like attached below.
The first column in the table present the mean of group1 and group2 and the following columns present the mean of group1 or group2 after taking out the members belong to group1 and group2. In other words, calculate the mean without the observations of the other group.
Is there a simple way to do that?
Group (1-2) | Mean group (1-2) | Mean (1) | SD (1) | Mean (2) | SD (2) |
(without group2) | (without group2) | (without group1) | (without group1) | ||
a-b | 281.7 | 446.0 | 182.1 | 446.0 | 223.0 |
a-c | 334.5 | 438.2 | 193.0 | 446.0 | 223.0 |
a-d | 594.7 | 311.9 | 100.5 | . | . |
b-c | 446.0 | 281.7 | 55.0 | 334.5 | 128.7 |
My data composed of two variables representing different groups (group1, group2) and one variable representing continues measure of the groups.
Code:
clear input str1 group1 str1 group2 x a b 223 a b 332 a b 290 a c 223 a c 446 a c 223 a c 446 a d 669 a d 446 a d 669 b c 223 b c 669 b c 446 end
Comment