Hi,
im doing undergrad research in horticulture and its my first time working with R so please forgive me if I do rookie mistakes.
In my experiment I wanted to evaluate three different beneficial insects and one insecticide in their effects against aphids. So for that reason I infected 50 plant groups of millet (isolated from surroundings by glass tube with cloth) with aphids and then introduced the beneficial insects (1, 2 and 3) and the insecticide (4) for 10 plant groups per treatment (I also did one controlgroup 0 without any further treatment). I harvested 5 plants for each plant group on two dates and counted the aphids: before the additional treatment and after the additional treatment with beneficial insects and insecticides. Then I subtracted the mean of the controlgroup at the second date with the seconddatemeasurements of all 50 plant group individualy to clarify the number of killed aphids per treament. My goal was to show significant differences between the treatments. So I tested for normal distribution of these results (divided by treatment) with an ShapiroWilkTest giving out following test results:
Faktorstufe p_value
1 0 0.194
2 1 0.392
3 2 0.00607
4 3 0.00594
5 4 0.544
These pvalues imply that I have to use a nonparametric test, right?
At least I assumed that was the case. So after that I performed a KruskalTest:
KruskalWallis rank sum test
 data: Auswirkung der Faktorstufe [n] by Faktorstufe
KruskalWallis chisquared = 36.806, df = 4, pvalue = 1.974e07
That means there are significant differences between the treatments, right?
Again I assumed it was that way.
Following the KruskalTest I did a dunntest:
KruskalWallis rank sum test
data: x and group
KruskalWallis chisquared = 29.4043, df = 3, pvalue = 0
Comparison of x by group
(Bonferroni)
Col Mean
Row Mean  1 2 3
+
2  3.778882
 0.0005*

3  4.324190 0.545307
 0.0000* 1.0000

4  0.507039 3.271842 3.817150
 1.0000 0.0032* 0.0004*
alpha = 0.05
Reject Ho if p <= alpha/2
print(dunn_test)
$chi2
[1] 29.40431
$Z
[1] 3.7788830 4.3241901 0.5453072 0.5070400 3.2718430 3.8171501
$P
[1] 7.876672e05 7.654662e06 2.927711e01 3.060634e01 5.342445e04 6.750102e05
$P.adjusted
[1] 4.726003e04 4.592797e05 1.000000e+00 1.000000e+00 3.205467e03 4.050061e04
$comparisons
[1] "1  2" "1  3" "2  3" "1  4" "2  4" "3  4"
Why is there another kruskaltestresult given out and why does it have such weird results?
I guess because of my ■■■■ty code, but Id like to know the specific reason.
Also can I even use this DunnTest to compare the significance of the different treatments (14)?
If so, would that classification according to significant differences in lowercase letters be correct?
1 = a
2 = b
3 = b
4 = a
I appreciate any help, thanks in advance guys!
Here is my Code for my actions (killed insecticides per treatment = Auswirkung der Faktorstufe [n]; treatments = Faktorstufe):
data < read_excel("~/Documents/Phyto (S. avenae).xlsx")
View(data)
shapiro_results < summarise(grouped_data, p_value = shapiro.test(Auswirkung der Faktorstufe [n]
)$p.value)
shapiro_results
kruskal_test < kruskal.test(Auswirkung der Faktorstufe [n]
~ Faktorstufe, data = data)
kruskal_test
library(dunn.test)
filtered_data < subset(data, Faktorstufe %in% c(1, 2, 3, 4))
dunn_test < dunn.test(filtered_data$Auswirkung der Faktorstufe [n]
, g = filtered_data$Faktorstufe, method = "bonferroni")
print(dunn_test)