I've datas as folllow:
DF=structure(list(exp_code = structure(c(1L, 2L, 3L, 4L, 5L, 6L,
7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L,
20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L,
33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 1L, 2L, 3L, 4L, 5L, 6L,
7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L,
20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L,
33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 1L, 2L, 3L, 4L, 5L, 6L,
7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L,
20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L,
33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 1L, 2L, 3L, 4L, 5L, 6L,
7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L,
20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L,
33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 1L, 2L, 3L, 4L, 5L, 6L,
7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L,
20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L,
33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L), .Label = c("IV (4)",
"VI (6)", "CH (9)", "LE (9)", "VI (11)", "JU (14)", "AB (15)",
"LE (16)", "AT (17)", "SA (17)", "OR (18)", "EP (20)", "PO (22)",
"SA (23)", "RU (25)", "SA (26)", "BR (28)", "GR (28)", "CH (29)",
"MA (30)", "PE (30)", "CH (32)", "MA (32)", "BO (33)", "LA (33)",
"LO (35)", "AR (36)", "LA (36)", "MA (37)", "EG (38)", "CH (39)",
"BR (43)", "ET (43)", "BR (44)", "BI (47)", "SA (50)", "VE (50)",
"ET (51)", "SE (52)", "DO (58)"), class = "factor", scores = structure(c(15,
36, 17, 47, 33, 28, 43, 44, 29, 32, 39, 9, 58, 38, 20, 43, 51,
28, 4, 14, 33, 36, 16, 9, 35, 30, 32, 37, 18, 30, 22, 25, 17,
23, 26, 50, 52, 50, 11, 6), .Dim = 40L, .Dimnames = list(c("AB (15)",
"AR (36)", "AT (17)", "BI (47)", "BO (33)", "BR (28)", "BR (43)",
"BR (44)", "CH (29)", "CH (32)", "CH (39)", "CH (9)", "DO (58)",
"EG (38)", "EP (20)", "ET (43)", "ET (51)", "GR (28)", "IV (4)",
"JU (14)", "LA (33)", "LA (36)", "LE (16)", "LE (9)", "LO (35)",
"MA (30)", "MA (32)", "MA (37)", "OR (18)", "PE (30)", "PO (22)",
"RU (25)", "SA (17)", "SA (23)", "SA (26)", "SA (50)", "SE (52)",
"VE (50)", "VI (11)", "VI (6)")))), category_result = structure(c(1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L), .Label = c("1", "2", "3", "4", "5"
), class = "factor"), value = c(5.5, 25, 17.5, 7.5, 6.5, 15.5,
1, 1.33333333333333, 8, 7.33333333333333, 4.5, 10, 1, 19.1666666666667,
1, 6, 13, 0, 0, 5, 1, 0.5, 0.333333333333333, 7, 1, 0, 0, 0.5,
1.5, 0.5, 0.5, 0.5, 1.5, 2.5, 1.5, 0, 1, 5.5, 0.5, 1.5, 0, 0,
4.5, 0.5, 0, 2, 1, 0.333333333333333, 0.5, 2.33333333333333,
0.5, 0, 0, 8.66666666666667, 0, 3, 5, 1, 0, 1, 0, 1.5, 1.33333333333333,
1, 0, 0.5, 2, 1, 0, 0, 0, 0, 0, 1.5, 0, 0.5, 0, 0, 0.5, 0, 24.5,
15, 24, 6, 10.5, 18.5, 10, 4.33333333333333, 2.5, 18.3333333333333,
13, 11, 1, 15.1666666666667, 3, 18, 17, 2, 3, 16, 0, 4, 1.33333333333333,
4, 3, 2.5, 7, 4.5, 1.5, 0.5, 0.5, 0.5, 3.5, 13, 0.5, 5.5, 0,
3.5, 2, 4.5, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1,
1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0,
1, 0, 1, 1, 2, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 2,
0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0)), row.names = c(NA, -200L), .Names = c("exp_code", "category_result",
"value"), class = "data.frame")
For each experiment code exp_code
I obtain for each one or few categories of result category_result
with different quantities defined by value
.
I want to compare the variance of category_result
between experiment by using the value
of the 5 categories. So I thinked about ANOVA. But Here, the problem is that there is three factors : variation of value
of each category_result
between exp code
?
EDIT 1: Trial on two-way anova, i googled it so I refer to this Link :
DF <- as.data.frame(DF)
int <- aov(DF$value ~ DF$exp_code + DF$category_result)
summary(int)
Do you think that this is an efficient way, I should reject the H0 according the p-value, but I want to be sure this is the good way to do it :
Df Sum Sq Mean Sq F value Pr(>F)
DF$exp_code 39 1432 36.7 2.754 5.15e-06 ***
DF$category_result 4 1565 391.3 29.360 < 2e-16 ***
Residuals 156 2079 13.3
EDIT 2 : Datas plot. Not the same number of exp_code
: for example IV (4) is repeated 31 times. These experiments can produce few category_result
at the same time, so I've weighting them, i.e., if two categories : each one 0.5, 0.5 but the total would be an integer.
EDIT 3 : Finally, use ez
package in order to mesure variability of category_result
between exp_code
, so here as I understood it is a rAnova. I want just confirmation that i'm doing it in the right way and that I understood your precious tips correctly.
ezANOVA(data=DF, dv=.(value), wid=.(exp_code), within=.(category_result), detailed=TRUE, type=3)
Thanks a lot!