Skip to main content
MedCalc
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
working
Show menu Show menu

Stack columns worked example

In this example we will use the top 10 rows of the data from Bland & Altman (1986).

Stack columns worked example

Since these data contain duplicate measurements for each method, they are suitable for a Bland-Altman plot with multiple measurements per subject. However, the data are not in the correct format since this procedure requires all measurements for one method to be in one single column only, and all measurements for the other method in a second column. A third column must contain a subject identifier.

Using the Stack columns command in the Tools menu, we first stack the WRIGHT1 and WRIGHT2 columns. We complete the dialog box as follows:

Stack columns worked example

We have selected the variables WRIGHT1 and WRIGHT2 as the variables to stack. Since there is no column or variable with case identification in the original data, we have left this selection blank. MedCalc will use the row number as case identifier.

We have selected the spreadsheet column E as the column to put case identification, column F to put the names of the variables and column G as the column to stack the data. For column E we have entered a new heading "Case" and for column G a new header "Wright".

After we click OK, we obtain the following:

Stack columns worked example

Next we stack the MINIWRIGHT1 and MINIWRIGHT2 columns and complete the dialog box in a similar manner as above:

Stack columns worked example

Our spreadsheet now looks like this:

Stack columns worked example

We can remove the columns we do not need (A, B, C, D, F and I) and also column H which is the same as column E.

Stack columns worked example

Finally we have the data ready for a Bland-Altman plot with multiple measurements per subject.

Literature

  • Bland JM, Altman DG (1986) Statistical method for assessing agreement between two methods of clinical measurement. The Lancet i:307-310.
  • Bland JM, Altman DG (2007) Agreement between methods of measurement with multiple observations per individual. Journal of Biopharmaceutical Statistics. 17:571-582.