r - Barplot with significant differences and interactions? -
I use a Barplot with your data and ANOVA statistics would visualize the joints, it is important that significant differences Get a signal of the conversation. How can you create such a conspiracy by using R?
This is what I would like:
Important difference:
key interactions:
the
bACKGROUND
I currently Just to give you an idea, this is my current conspiracy: As you type the function First of all, the If you see the object / Code> Now I use high confidence interval values to calculate the coordinates for the y values of segments. Segments will start from the position which is greater than 1, at the end of the confidence interval. There are four rows in Barplot is used To plot texts on the segments, calculate X and Y coordinates, where x is the midpoint of x values and y values of Calculation Each time the pair is done with the intervals of some constants of confidence. Then use the function Using the barplot 2 {ggplots} at the plot time and confidence interval, but I would like to use any package / process to do the job I'm ready. To get the data I currently
TukeyHSD {stats} or
pairwise.t.test {for stats} difference and ANOVA functions (
aov ezANOVA {ez} ,
gls {nlme} ).
barplot2 () from the library
Gplots , give examples using this approach.
barplot2 () function in the form of a barlot given in the help file. The duplicate confidence interval value is
ci.l and
ci.u the barplot must be saved as an object.
hh < - T (VADETH) [1: 2, 5: 1] margarol & lt; - "Gray 20" CIL. LT <- HH * 0.85 Ci.u < - hh * 1.15 mp & lt; - barplot2 (hh, beside = TRUE, col = c ( "gray12", "gray82"), Legend = colnames (VADeaths) [1: 2], ylim = c (0, 100), cex.names = 1.5, Plot.ci = TRUE, ci.l = ci.l, ci.u = ci.u)
MP , all in it X coordinates for the bar are included. [2], 2.5 5.5 8.5 11.5 14.5
y.cord - the first and second lines correspond to the first time and the other two rows for the second time, calculating the highest Y value each time for the maximum values of confidence interval for the pair She goes. The
x.cord values repeat only the values that are in the
mp objects, every 2 times.
y.cord & lt; -rbind (CIU [1,] + 1), C (CIU, 2, max) +5), C (Apply CI, 2, Max) +5), CI .U [2,] + 1)) x.cord & lt; -apply (mp, 2, function (x) representative (x, each = 2))
index () five line segments To create (because at this time there are 5 groups)
sapply (1: 5, function (x) line using the coordinate coordinates (x.cord [, x], y.cord [, X]))
text () to add the information.
x.text & lt; -col means (mp) y.text & lt; -apply (ci.u, 2, max) +7 text (c ("(", "**", "**", "***", "ns", "***"), x = X.text, y = y.text)
Comments
Post a Comment