Stacked vs. Unstacked data
main topic
      

In unstacked data, each sample is in a separate column. Alternatively, you can stack all the data in one column and add a column of grouping indicators that define each sample. Like censoring indicators, grouping indicators can be numbers or text.

Here is the same data set structured both ways:

Unstacked Data

 

Stacked Data

Drug A

20

30

43

51

57

82

85

89

Drug B

 2

 3

 6

14

24

26

27

31

 

Drug

20

30

43

51

57

82

85

89

 2

 3

 6

14

24

26

27

31

Group

A

A

A

A

A

A

A

A

B

B

B

B

B

B

B

B

Note

You cannot analyze more than one column of stacked data at a time, so the grouping indicators must be in one column.