With “Compare Paired Samples”, you can test potential differences in numerical variables between paired groups:
Alternative 1: Paired data within the same subject, such as two blood pressure measurements in the same individual. These data are located in two variables and in the same entry.
Alternative 2: The same dependent variable in two matched groups, or where data in the same subject are located in different entries. For example, a study participant visits twice, and separate entries are made for each visit. These data are located in one variable but in different entries.
Alternative 3: Using data within the same subject stored in a series. These data are located in one entry but in different series entries.
From the analysis window, click "+ New analysis" and choose "Compare Paired samples" from the dropdown menu.
In the right margin, first, choose which data model you want to use: "Single entry" (refers to alternative one above), "Two entries" (refers to alternative 2 above), or "Using series" (refers to alternative 3 above).
For Single entry:
Enter the "Test variable 1" (a numeric variable) (i.e., first blood pressure measurement)
Enter the "Test variable 2" (a numeric variable) (i.e., second blood pressure measurement)
Activate the toggle switch beside "Paired t-test" or "Paired Wilcoxon test" in the right margin of the analysis card.
The result is shown beneath the table as t(degrees of freedom) = t-value, p = p-value for the paired t-tes,t and T = test statistic, p = p-value for the paired Wilcoxon test.
For Two entries:
Select the dependent variable under "Test variable 1"
Select the group variable under "Groups"
Select the first observation you want to compare under "Before"
Select the second observation you want to compare to the first one under "After"
Enter the "Pair identifier" variable, which identifies which subjects are pairs. The value in this variable can only be numeric or text, and the different pairs need to have exactly the same and unique value (for example, the first pair has “1”, the second pair has “2”, and so on)
Activate the toggle switch beside "Paired t-test" or "Paired Wilcoxon test" in the right margin of the analysis card.
The result is shown beneath the table as t(degrees of freedom) = t-value, p = p-value for the paired t-test and T = test statistic, p = p-value for the paired Wilcoxon test.
For Using Series:
Select the series containing the data under "Series"
Select the variable of interest under "Test variable"
Select the group variable under "Groups"
Select the first observation you want to compare under "Before"
Select the second observation you want to compare to the first one under "After"
Activate the toggle switch beside "Paired t-test" or "Paired Wilcoxon test" in the right margin of the analysis card.
The result is shown beneath the table as t(degrees of freedom) = t-value, p = p-value for the paired t-test and T = test statistic, p = p-value for the paired Wilcoxon test.
The paired t-test is parametric and assumes normality of the data and equality of variances. The Wilcoxon test is non-parametric and does not assume normality.
You can apply filters to the dataset to analyse subgroups (optional).
(Optional) Export your results.