Wilcoxon signed-rank, Mann-whitney U, else?
Posted: Fri Apr 21, 2023 4:20 pm
Hi there, I'm looking for the appropriate statistical test and I couldn't find any similar topics discussed previously, apologies if I missed it or if I am posting in the wrong section, I'm new to this
In my dataset, I have data collected from patients regarding their pulmonary function tests (PFTs). For instance one of them is forced vital capacity (FVC) in liters recorded for each patient at baseline and 1 year later. From this data, I created a variable with FVC variation by substracting the latter to the first.
One of my variables is a grouping variable which splits my patients into two groups, familial patients and sporadic patients. In case it matters somehow, the number of patients is different in each group (something like 95 and 110).
All normality tests are significant which is why I used non-parametric tests.
My goal was to look for differences in FVC variation among the two groups (sporadic and familial).
While I initially ran a Mann-Whitney U test, I then realised FVC variation comes from repeated values in the same patient, so I thought maybe a paired test was best suited (Wilcoxon Signed-rank test), however, I can't find the way to add a grouping variable to compare familial patients to sporadic patients.
Am I wrong somewhere? Should I be using a Mann-Whitney U since the groups are independent, or a Wilcoxon signed-rank test? If so can I and how can I add a grouping variable to this test?
I hope I made myself clear and thanks ahead for the help.

In my dataset, I have data collected from patients regarding their pulmonary function tests (PFTs). For instance one of them is forced vital capacity (FVC) in liters recorded for each patient at baseline and 1 year later. From this data, I created a variable with FVC variation by substracting the latter to the first.
One of my variables is a grouping variable which splits my patients into two groups, familial patients and sporadic patients. In case it matters somehow, the number of patients is different in each group (something like 95 and 110).
All normality tests are significant which is why I used non-parametric tests.
My goal was to look for differences in FVC variation among the two groups (sporadic and familial).
While I initially ran a Mann-Whitney U test, I then realised FVC variation comes from repeated values in the same patient, so I thought maybe a paired test was best suited (Wilcoxon Signed-rank test), however, I can't find the way to add a grouping variable to compare familial patients to sporadic patients.
Am I wrong somewhere? Should I be using a Mann-Whitney U since the groups are independent, or a Wilcoxon signed-rank test? If so can I and how can I add a grouping variable to this test?
I hope I made myself clear and thanks ahead for the help.