Hi,
I would like to generate multiple groups of observations for each different combination of a group of numbers. For example:
var1 group order
1 1 1
2 1 2
3 1 3
4 1 4
5 1 5
6 1 6
7 1 7
and would like to get the following:
var1 group order
1 1 1
2 1 2
3 1 3
4 1 4
5 1 5
6 1 6
7 1 7
1 2 1
2 2 2
3 2 3
4 2 4
5 2 5
7 2 6
6 2 7
1 3 1
2 3 2
3 3 3
7 3 4
4 3 5
5 3 6
6 3 7
etc..
for all potential combinations of the numbers 1 to 7, so a total of 7!=5040 different groups. Any help would be much appreciated.
Thank you
I would like to generate multiple groups of observations for each different combination of a group of numbers. For example:
var1 group order
1 1 1
2 1 2
3 1 3
4 1 4
5 1 5
6 1 6
7 1 7
and would like to get the following:
var1 group order
1 1 1
2 1 2
3 1 3
4 1 4
5 1 5
6 1 6
7 1 7
1 2 1
2 2 2
3 2 3
4 2 4
5 2 5
7 2 6
6 2 7
1 3 1
2 3 2
3 3 3
7 3 4
4 3 5
5 3 6
6 3 7
etc..
for all potential combinations of the numbers 1 to 7, so a total of 7!=5040 different groups. Any help would be much appreciated.
Thank you
Comment