tukey

How to generate a compact letter display for pairwise TukeyHSD

时光总嘲笑我的痴心妄想 提交于 2021-01-07 03:24:52
问题 I'm having trouble generating a compact letter display for my results. I've run an ANOVA followed by Tukey's HSD to generate the p values for each pair, but I do not know how (or if it is possible?) to assign letters to these p values to show which pairs are significant from each other. csa.anova<-aov(rate~temp*light,data=csa.per.chl) summary(csa.anova) TukeyHSD(csa.anova) This runs the tests I need, but I don't know how to assign letters to each p value to show which pairs are significant.

'<' not supported between instances of 'float' and 'str' Error for Tukey HSD Test

跟風遠走 提交于 2020-12-26 04:59:52
问题 I get a strange error when running the Tukey test. I hope somebody is able to help me with this as I tried a lot. This is my dataframe: Name Score 1 A 2.29 2 B 2.19 This is my Tukey Test code: #TUKEY HSD TEST tukey = pairwise_tukeyhsd(endog=df['Score'].astype('float'), groups=df['Name'], alpha=0.05) tukey.plot_simultaneous() plt.vlines(x=49.57,ymin=-0.5,ymax=4.5, color="red") tukey.summary() This is the error: <ipython-input-12-3e12e78a002f> in <module>() 2 tukey = pairwise_tukeyhsd(endog=df[

Consistent lettering across facets for Tukey letter plot on ggplot

不羁的心 提交于 2020-03-05 03:55:33
问题 I have followed the answer from this question: Tukey test results on geom_boxplot with facet_grid It is great, but what I would like is to compare the facets between them as well. In other words, letter order all of the results first then divide it into facets (I have both horizontal and vertical facets). How can I do this? Also, how can I reorder the letters to start from "a" in the first variable in the first facet, and then "b" the second variable and so on? I tried the following, and it

one way ANOVA and TUKEY in R with conditions

前提是你 提交于 2020-01-16 16:29:09
问题 I am trying to find the mean differences between my variable stim_ending_t which contains the following 6 factors: 1, 1.5, 2, 2.5, 3, 3.5 You can access the df Here stim_ending_t visbility soundvolume Opening_text m sd coefVar <dbl> <dbl> <dbl> <chr> <dbl> <dbl> <dbl> 1 1 0 0 Now focus on the Image 1.70 1.14 0.670 2 1 0 0 Now focus on the Sound 1.57 0.794 0.504 3 1 0 1 Now focus on the Image 1.55 1.09 0.701 4 1 0 1 Now focus on the Sound 1.77 0.953 0.540 5 1 1 0 Now focus on the Image 1.38 0

Loop through several post hoc tests in R

好久不见. 提交于 2019-12-13 07:24:28
问题 I have a dataframe called data. I have created a function that loop thorugh a list of variables and creates a linear model for each of them using lapply. This method is based on this post. library(datasets) testDF <- data.frame(Salaries) #creates list of variables varListTest <- names(testDF)[3:4] #creates a model for each of the variables in question model<- lapply(varListTest, function(x) { lm(substitute(i~Rank, list(i = as.name(x))), data = testDF)}) #output model lapply(model, summary)

Tukey test results on geom_boxplot with facet_grid

ε祈祈猫儿з 提交于 2019-12-11 07:05:17
问题 I'd love to place letters representing the results of a Tukey's HSD on boxplots I make in ggplot. I am aware of other posts (Tukeys post-hoc on ggplot boxplot, Tukey's results on boxplot in R) but in my case, I work with facet_grid and I am not sure how to proceed. As I am creating a lot of boxplots, I would love to have something automated. Any tips to help me get me started would be greatly appreciated. Thanks a lot library(multcompView) library(ggplot2) #sample dataframe df <- data.frame

Tukey's results on boxplot in R

感情迁移 提交于 2019-12-01 13:18:27
I am working on placing letters representing the results of a Tukey's HSD on a boxplot that I've made. I've found a description of how to do it here: r-graph gallery , but I am getting an error after I run the function. Here is my data: dput(WaterConDryMass) structure(list(ChillTime = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L), .Label = c("Pre-chill", "6", "13", "24", "Post-chill"), class = "factor"), dmass = c(0.22, 0.19, 0.34, 0.12, 0.23, 0.33, 0.38, 0.15, 0.31, 0.34, 0.45, 0.48, 0.59, 0.54, 0.73, 0.69, 0.53, 0.57, 0.39, 0.8)), .Names = c(

Tukey's results on boxplot in R

萝らか妹 提交于 2019-12-01 12:02:46
问题 I am working on placing letters representing the results of a Tukey's HSD on a boxplot that I've made. I've found a description of how to do it here: r-graph gallery, but I am getting an error after I run the function. Here is my data: dput(WaterConDryMass) structure(list(ChillTime = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L), .Label = c("Pre-chill", "6", "13", "24", "Post-chill"), class = "factor"), dmass = c(0.22, 0.19, 0.34, 0.12, 0.23, 0.33