# What test for repeated measurements with binary outcome?

Patients will be measured 1. during an operation and 2. after the operation.

Measurement 1: During the operation with machine1 to assess whether the transplanted tissue is at the right location (Outcome is binary (right location vs wrong location)).

Measurement 2: Measurements will be performed 1 months after the operation with machine2 to assess whether the transplanted tissue is still at the right location and did not migrate (Outcome is binary, right/wrong location).

Research question: How well does a positive/negative result during measurement 1 predict the outcome of having the tissue at the right/wrong location at measurement2?

Which test is appropriate to answer the research question? I use SPSS.

Thank you for your time, I am looking forward to your replies. -Leif

• do you have only two variables? measurement 1 and measurement 2? Commented Sep 13, 2017 at 9:28
• @YuvalSp That is correct. But the measurements after the operation will be at multiple time points (1 week, 1 month, 3 months), however, if any of these show a change in location,the treatment will be considered 'failed', so the outcome is still binary: During operation: 1 for good location, 0 for wrong location After operation: At all time points good location: 1; at any time point wrong location: 0. I hope that makes it clear. (in regards to the edit: I wasn't aware that the return key will post the comment) Commented Sep 15, 2017 at 7:15

You probably want to use McNemars test, which is a type of binary contingency test for paired data (like Chi Square taking into account within subject measurements). In SPSS go to:

Analyze $\rightarrow$ Nonparametric Tests $\rightarrow$ Legacy Dialogs $\rightarrow$ 2 Related Samples

If the test is significant ($p<0.05$ or whatever value you use) than the locations are not randomly distributed, meaning that the right/wrong location during surgery is likely influencing the location post-surgery.

Edit: If one of the cells in the 2x2 contingency table has 0 in it, but not due to any problem with the data itself - it is not a problem. This can be due to the fact that all of the patients who had the wrong location during operation have a wrong location post-operation (0 in the wrong-right cell). This will likely translate to a significant test.

• Thanks for the insight! One follow-up question: Is it valid to use McNemars if one cell in the 2x2 table is empty (=0)? Commented Sep 15, 2017 at 7:28
• see answer in edit above. Commented Sep 15, 2017 at 12:51
• I ran the analysis and did not reach significane. However, I just want to be clear about the interpretation. The goal of the study is to test how well the pretest can predict the posttest result. So now that I did not reach significane, it means that my pretest does predict the posttest, since people that stayed in location1 remain at location1 in the posttest. If I did reach significane it would mean that patients switched from one group to the other (e.g. from right location to wrong location). Is my interpretation correct? Commented Sep 24, 2017 at 17:36