I have two groups (Control and Disease) and for each group a variable y is measured at three time points (0H, 24H, 48H). I want to know two things:
- Does y change between Control and Disease at each timepoint i.e. Control 0H v Disease 0H etc
- Does y change over time within each group ie Control 0H v Control 24H v Control 48H (all pairwise comparisons within a group)
For (1) I carried out a Wilcoxon to identify changes within each time point grouped by group (control and disease). However I am struggling with (2). So far I have grouped by each group and then run a Kruskal Wallis to see if any timepoints change in each group, I then follow this with a Dunns test to find out which timepoints are different. Is this the correct way to answer this question?
res.aov <- Data %>% group_by(group)%>% # control and disease kruskal_test(y ~ time) # change in the variable y. 'time' refers to # the 6 groups - C0 C24 C48 D0 D24 D48
OR should I run a non parametric test for all pairwise comparisons (therefore addressing both (1) and (2)) but I am not interested in all the comparisons for example how Control at 0H differs from Disease at 24H... this will only make it harder to find significance.
- The data is not normally distributed and equal variances is not always met (based on Shapiro Wilk test, qq plots, and Levene test respectively)
- Control n = 15 (n=5 for each timepoint)
- Disease n = 30 (n=10 for each timepoint)