4
$\begingroup$

I am analyzing three years' worth of data. For some descriptive analysis, I want to know if there is a difference in the median between, $year_1$ and $year_2$ compared to $year_3$. To do this, I planned to average $year_1$ and $year_2$, creating a comparable 12-month reference group with $year_3$. I would then use the Wilcoxon signed rank test. Would this be a fair way to understand the data? The data is considered paired.


Thank you for your feedback. Let me first state, this is a preliminary analysis for a larger interrupted time series analysis in which autocorrelation is account for (using ARIMA).

Knowing this, would you still suggest the the Wilcoxon Mann-Whitney two sampled ranked sum test (from this initial phase)? And if so, it is acceptable to have unequal groups ($n=24$ and $n=12$)?Also, the rate are coming from one distinct location, which is why I first instinctively considered them paired.

Edit: or is the creation of the (pre 12-month reference group still applicable)

I appreciate your continued input and support.

$\endgroup$
3
  • 1
    $\begingroup$ The Mann-Whitney Wilcoxon rank sum test is not properly a test for median difference. Rather, it is a test for evidence that $Pr(X_1 > X_2) \ne 0.5$. With additional stringent assumptions that groups 1 & 2 have (i) the same shape distribution, and (ii) the same variance, you can interpret a rejected rank sum null hypothesis as evidence for median difference (and for mean difference also). Tests for median difference in 2 or more groups are a variation of Pearson's $\chi^2$ test; e.g., see Conover's Practical Nonparametric Statistics section 4.3: The Median Test. $\endgroup$
    – Alexis
    Commented Dec 9, 2022 at 18:20
  • $\begingroup$ Also: Welcome to CV, Levi. $\endgroup$
    – Alexis
    Commented Dec 9, 2022 at 18:21
  • $\begingroup$ what about a test such as this? (blogs.sas.com/content/iml/2017/02/22/…) Quantile regression $\endgroup$
    – Levi M
    Commented Dec 9, 2022 at 21:46

1 Answer 1

7
$\begingroup$

The Wilcoxon signed-rank test, made almost obsolete by the rank difference test is only for naturally paired data. You do not have paired data but rather data more suitable for the Wilcoxon Mann-Whitney two-sample rank-sum test (although we are ignoring serial correlation in the data). A better way to think about your problem is whether there is a non-flat time-trend, and it's best to use time as a continuous variable (e.g., year + fraction of year). You can use a regression spline to relate time to response using a suitable model such as the proportional odds ordinal logistic model which generalizes the Wilcoxon two-sample test. Resources for this model are here.

If you have the time to take serial correlation into account you can easily use a Markov process with the proportional odds model. For example a lag-1 analysis would be a first-order Markov process. Details are in my course notes here.

$\endgroup$
4
  • $\begingroup$ I posted my last response incorrectly in an answer box thus it got deleted. But I wanted to make sure to say thank you for the response $\endgroup$
    – Levi M
    Commented Dec 9, 2022 at 15:53
  • 2
    $\begingroup$ Frank Harrell, thank you so much for that reference to the rank difference test! $\endgroup$
    – Alexis
    Commented Dec 9, 2022 at 18:25
  • $\begingroup$ Frank, how about something like the link below, Quantile regression. linearity, homoscedasticity, independence, or normality are not met?blogs.sas.com/content/iml/2017/02/22/… $\endgroup$
    – Levi M
    Commented Dec 9, 2022 at 21:51
  • $\begingroup$ Quantile regression is not very efficient when sample sizes are not large. $\endgroup$ Commented Dec 10, 2022 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.