The boxplot and histogram tell you all by themselves that your data are skewed, especially in group A. The Shapiro-Wilk test is kind of pointless. With data thusly skewed the ANOVA isn't really appropriate. The Kruskal-Wallis rank sum test is based on the ranks, not the absolute values and doesn't require normality, either in the measures or residuals. It is the more appropriate test.
A quick Google search will tell you one requires normality and one does not.
One thing you might consider is that durations are an arbitrary representation of time. For example, you can indicate the duration of an event as 2 s or you can say the event has a rate 0.5 events/s. It's the exact same thing and both numbers can arbitrarily be interchanged for representation. However, rates tend to be much less skewed and more appropriate for statistical analysis. It's possible your rates are normally distributed and you can use ANOVA in that case.
If you do decide to look at rates, keep in mind that the direction of magnitude changes, a higher duration values = a lower rate value. Some people use a negative rate just to avoid that confusion.
No, it is not a valid nonparametric alternative.
The rank sum test (either original Wilcoxon flavor, or New Improved Mann-Whitney $U$ varieties):
- ignore the rankings used by the Kruskal-Wallis test, and
- do not employ pooled variance for the pairwise tests.
See, for example, Kruskal-Wallis Test and Mann-Whitney U Test. (Also the pairwise.wilcox.test seems not to have the ties adjustments that these tests do.)
The nonparametric pairwise multiple comparisons tests you are likely looking for are Dunn's test, the Conover-Iman test, or the Dwass-Steel-Crichtlow-Fligner test. I have made packages that perform Dunn's test (with options for controlling the FWER or FDR) freely available I have implemented Dunn's test for Stata and for R, and have implemented the Conover-Iman test for Stata and for R.
References
Conover, W. J. and Iman, R. L. (1979). On multiple-comparisons procedures. Technical Report LA-7677-MS, Los Alamos Scientific Laboratory.
Crichtlow, D. E. and Fligner, M. A. (1991). On distribution-free multiple comparisons in the one-way analysis of variance. Communications in Statistics—Theory and Methods, 20(1):127.
Dunn, O. J. (1964). Multiple comparisons using rank sums. Technometrics, 6(3):241–252.
Best Answer
The proportional odds ordinal logistic model is a generalization of the Wilcoxon and Kruskal-Wallis tests that extend to multiple covariates, interactions, etc. It is a semiparametric method that only uses the ranks of Y. It handles continuous Y, creating k-1 intercepts where k is the number of unique Y values.