I am trying to obtain a Pareto chart from a two-way ANOVA. I found the packages ggDoE and unrepx, but from what I´ve read there were created for unreplicated designs. However, mine has replicas and the Pareto plot that I obtained does not make a lot of sense.
Here is my example data:
dput(example)
structure(list(DES = structure(c(11L, 11L, 9L, 9L, 10L, 10L,
5L, 5L, 8L, 8L, 2L, 2L, 6L, 6L, 7L, 7L, 3L, 3L, 1L, 1L, 4L, 4L,
1L, 1L, 2L, 2L, 3L, 3L, 4L, 4L, 5L, 5L, 6L, 6L, 7L, 7L, 8L, 8L,
9L, 9L, 10L, 10L, 11L, 11L), levels = c("A", "B", "C", "D", "E",
"F", "G", "H", "I", "J", "K"), class = "factor"), Ratio = structure(c(2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), levels = c("1",
"3"), class = "factor"), PRY = c(7.12064620797705, 7.02935218168787,
11.7559599159035, 12.8868203734562, 2.57784482134724, 2.45529982891346,
9.83816337862396, 10.6341131655053, 5.58696919789374, 6.10629415869594,
13.5364021554198, 14.2026250016013, 2.48357888545602, 2.90838166715465,
9.84576856370079, 9.13247415741812, 6.23714315602135, 7.15774040730975,
9.74694589720331, 9.46028712246863, 4.74443865658957, 5.31001514000798,
5.25597037889386, 5.63558719443459, 2.41249148804721, 2.18943912813037,
6.93419820835072, 6.88222661237541, 5.7026743394133, 0.462652793056336,
2.85613436241898, 7.20644835125381, 7.74106887495522, 2.90803943276227,
3.15473868957604, 7.98790723570548, 5.76383184531344, 0.925584043526002,
1.39315024630322, 6.6186363066663, 7.51991670352799, 7, 7.07491933132894,
7.34445942791121)), row.names = c(NA, -44L), class = c("tbl_df",
"tbl", "data.frame"))
And here the code I used to obtain the Pareto plot:
model<-lm(PRY~ DES + Ratio, data=example)
pareto_plot(model)
In the Pareto plot, only three bars should appear (DES, Ratio, and their interaction).
Moreover, I also would like to know the difference between ME and SME. Maybe it´s easier to calculate de absolute effects and ME/SME in Excel, and the create my own plot.
