What Statistical Test to use to determine significant difference between ordinal variables pre and post intervention I have a variable that has 4 levels low, med, high, very high. The variable is from two time points, in 2013 and 2019, assessed using the same survey on the same subject/study individuals. I'm struggling to figure out exactly how to compare these. Is there a way to compare the variables as a whole? or do I compare the individual levels eg high 2013 vs high 2019? and what test would be best?
180 subjects, and the counts were recorded at each of the 4 levels eg:
2013 cleanliness: low=20 med=40 high=90 very high=30   and
2019 cleanliness: low=10 med=80 high=70 very high=20
I was considering a chi square test, but they aren't independent.
paired T test is likely also a no go?
Please correct me if I'm wrong.

This is how I imagine your data set:
You have two dependent groups and measured cleanliness as an ordinal variable from let's say 1 = low to 4 = very high.
> data <- list(first = c(rep(1,20), rep(2, 40), rep(3, 90), rep(4, 30)), 
second = c(rep(1, 10), rep(2, 80), rep(3, 70), rep(4, 20)))

In R you could do the sign test for this with the function signt from the Wilcox Robust Statistics (WRS) package:
# load the package
> source("https://dornsife.usc.edu/assets/sites/239/docs/Rallfun-v38.txt")

> signt(as.data.frame(data))

$Prob_x_less_than_y
[1] 0.2

$ci
[1] 0.1105025 0.3323061

$n
[1] 180

$N
[1] 50

$p.value
[1] 0.001

The signt function tests H0: p = 0.5. You see we can reject and see that it is more likely to observe a higher value in the first group than in the second because p = 0.2 which is lower than 0.5. The confidence interval does not contain p = 0.5 so we can conclude that the groups differ significantly.
A disadvantage of this test is that if we have tied values like in this example, the sign test deals with them by ignoring them. This leaves us with a sample of just 50 observations.
If you want more power you can also use the improved Friedman test by Brunner et al. for two or more dependent groups accessible through the function bprm. Tied values are handled as midranks in this case and you see the p-value is lower. A disadvantage is that it just tells you that there is a difference but nothing else:
> bprm(data)
$test.stat
[1] 31.36682

$nu1
[1] 1

$p.value
[1] 2.136558e-08

Hope that helps!
