Data wide -> long
------------------------------------------------------------------------
-----
Number of obs. 3 -> 9
Number of variables 4 -> 3
j variable (3 values) -> index
xij variables:
group_1 group_2 group_3 -> group_
------------------------------------------------------------------------
-----
. list
+--------------------+
| m index group_ |
|--------------------|
1. | 1 1 aa |
2. | 1 2 aa |
3. | 1 3 bb |
4. | 2 1 aa |
5. | 2 2 aa |
|--------------------|
6. | 2 3 bb |
7. | 3 1 aa |
8. | 3 2 bb |
9. | 3 3 bb |
+--------------------+
Data long -> wide
------------------------------------------------------------------------
-----
Number of obs. 9 -> 3
Number of variables 3 -> 4
j variable (3 values) m -> (dropped)
xij variables:
marker -> marker1 marker2 marker3
------------------------------------------------------------------------
-----
. list
+-------------------------------------+
| index marker1 marker2 marker3 |
|-------------------------------------|
1. | 1 aa aa aa |
2. | 2 aa aa bb |
3. | 3 bb bb bb |
+-------------------------------------+