I have paired data with measurement of time in seconds for unstructured type (variable clean_final_Unstructured_time_ID_only_aggregated_ordered$Time
) and structured type (variable clean_final_Structured_time_ID_only_aggregated_ordered$Time
).
First I calculate median differences:
(median_Unstructured_agreg <- median(clean_final_Unstructured_time_ID_only_aggregated_ordered$Time))
(median_Structured_agreg <-median(clean_final_Structured_time_ID_only_aggregated_ordered$Time))
median_Unstructured_agreg - median_Structured_agreg
output:
> (median_Unstructured_agreg <- median(clean_final_Unstructured_time_ID_only_aggregated_ordered$Time))
[1] 219
> (median_Structured_agreg <-median(clean_final_Structured_time_ID_only_aggregated_ordered$Time))
[1] 319.5
>
> median_Unstructured_agreg - median_Structured_agreg
[1] -100.5
>
After I am conducting "Sign Test for Two-sample Paired Data" (as described here: https://rcompanion.org/handbook/F_07.html)
library(BSDA)
SIGN.test(x = clean_final_Unstructured_time_ID_only_aggregated_ordered$Time,
y = clean_final_Structured_time_ID_only_aggregated_ordered$Time,
alternative = "two.sided",
conf.level = 0.95)
output:
Dependent-samples Sign-Test
data: clean_final_Unstructured_time_ID_only_aggregated_ordered$Time and clean_final_Structured_time_ID_only_aggregated_ordered$Time
S = 4, p-value = 0.1185
alternative hypothesis: true median difference is not equal to 0
95 percent confidence interval:
-224.23839 38.26659
sample estimates:
median of x-y
-99
Achieved and Interpolated Confidence Intervals:
Conf.Level L.E.pt U.E.pt
Lower Achieved CI 0.8815 -211.5000 -32.0000
Interpolated CI 0.9500 -224.2384 38.2666
Upper Achieved CI 0.9648 -227.0000 53.5000
As I understand median of x-y
from my output is the same as "paired differences" from here: https://statistics.laerd.com/spss-tutorials/sign-test-using-spss-statistics.php and there they interpret that value as I understand difference of medians "The carbohydrate-protein drink elicited a statistically significant median increase in distance run (0.113 km) compared to the carbohydrate-only drink, p = .004."
Question:
Why the difference of two medians that I calculated
-100.5
is different from BSDA R packagemedian of x-y
value which is-99
? I understand that that is not much difference but anyway it is and I want to know why.Can I present that median differences as effect size?