Stack columns worked example
In this example we will use the top 10 rows of the data from Bland & Altman (1986).
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:
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 orignal 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, we obtain the following:
Next we stack the MINIWRIGHT1 and MINIWRIGHT2 columns and complete the dialog box in a similar manner as above:
Our spreadsheet now looks like this:
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.
Finally we have the data ready for a Bland-Altman plot with multiple measurements per subject.
- 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.