0
$\begingroup$

I have some environmental monitoring data that I've collected over 4 different years. I'd like to analyses the trend in the condition over this time period.

2010 2013 2017 2022
Very good 37 34 8 29
Good 42 43 16 7
Fair 41 44 22 1
Poor 60 26 21 1
  • Each plot was assessed in each assessment year (repeated measures?)
  • Each plot was given a condition score of very good, good, fair or poor (ordinal categorical variable?)
  • I've excluded "unknown" as it's not really ordinal meaning that the number of responses can vary between years as the number of 'unknown' plots changes.

When comparing the two most recent years, I used a Mann-Whitney U test:

result_table <- table(lapply(unstack(data, Condition ~ Year), factor, levels = c("Very good", "Good", "Fair", "Poor")))
df <- as.data.frame.matrix(result_table)
score <- c("Very good", "Good", "Fair", "Poor")
mh_test(as.table(result_table), scores = list(response = 1:length(score)), distribution='exact')

How do I analyse the full data set with all four years?

$\endgroup$

2 Answers 2

0
$\begingroup$

Since this is ordinal (ranked) data and we are comparing >2 levels of an independent variable (years), the classic approach will be Friedman's test. You can think of this as a robust alternative to the parametric repeated measures ANOVA. Since you posted R code, I'll assume you are interested in using R to run this analysis. I prefer the rstatix package for this, with the friedman_test() fucntion, read a walkthrough here. If you prefer base R stats, you can see this function.

There are additional ranked based methods for >2 dependent groups. Wilcox (2021) has a really nice chapter highlighting a number of valid approaches. See his chapter 8, section 5 for further suggestions. He also has R code available for running these approaches. Let me know if you'd like more detail.

$\endgroup$
2
$\begingroup$

A comprehensive solution may be obtained by forming an ordinal semiparametric model such as the proportional odds (PO) model. The PO model is a full generalization of the Wilcoxon and Kruskal-Wallis tests and also can handle paired data.

Note that the Friedman test has low relative efficiency since it reduces to the sign test in its simplest form.

$\endgroup$

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.