Questions tagged [tukey]

The Tukey test is a single-step statistical test for multiple comparison, named after John Tukey. It is used to find significantly different mean, by comparing all pairs on means based on a studentized range distribution.

The Tukey test is a single-step statistical test for multiple comparison, named after John Tukey. It is used to find significantly different mean, by comparing all pairs on means based on a studentized range distribution.

Assumptions

  1. Independence of observations within and among groups
  2. Normal distribution within group
  3. Equal within-group variance across the groups (Homogeneity of variance)

Also known as:

  • Tukey's Honestly Significant (Difference) test
  • Tukey HSD test
  • Tukey-kramer test/method
165 questions
15
votes
4 answers

How to do a Tukey HSD test with the Anova command (car package)

I'm dealing with an unbalanced design/sample and originally learned aov(). I know now that for my ANOVA tests I need to use the Type III Sum of Squares which involves using fitting using lm() rather than using aov(). The problem is getting post-hoc…
leighadlr
  • 159
  • 1
  • 1
  • 5
14
votes
1 answer

Error in TukeyHSD.aov(my_data) : no factors in the fitted model

I have successfully uploaded data, run shapiro, bartletts and one way anova on my data set however no matter what I try I can't seem to run TukeyHSD without getting some error message such as the one above this is what I have inputted is there…
Flo27
  • 141
  • 1
  • 1
  • 3
6
votes
1 answer

Adding Tukey's significance letters to boxplot

I'm trying to create a boxplot with ggplot of a count (MedMean) on yaxis and various independent samples (Site_Name) on xaxis. ggplot(medianlist,aes(x=reorder(Site_Name,MedMean,FUN=median),y=MedMean))+ geom_boxplot() I want to add Tukey's…
B.Shermeister
  • 507
  • 2
  • 6
  • 17
5
votes
1 answer

How do I run a two-way ANOVA that uses type III errors and looks at pairwise comparisons?

I have a dataset with which I would like to compare the effect of species and habitat on homerange size - while using type III errors and pairwise comparisons within species and habitat. Here's a subset of the data: species<-…
Luke
  • 4,769
  • 5
  • 28
  • 36
4
votes
2 answers

Exporting TukeyHSD results

I'm having trouble exporting my TukeyHSD results so that they are separated in cells when I open the results up in something like Excel. I tried using write.csv() but it says: cannot coerce class "c("TukeyHSD", "multicomp")" to a data.frame How can…
Ren Zhang
  • 91
  • 1
  • 2
  • 7
3
votes
1 answer

Referencing object elements

I'm trying to access individual elements of an object returned from TukeyHSD function. I can see how to access the individual elements, but how do I access the labels? $`Auto$CargoSpace` diff lwr upr p…
JD08
  • 33
  • 4
3
votes
1 answer

Is using 'adjust = "tukey"' in emmeans equivalent to a Tukey HSD test?

I have been looking around and I am quite confused about Tukey adjustment in emmeans. The documentation of emmeans doesn't mention Tukey HSD at all, but in here it is said that "For most contrast() results, adjust is often something else, depending…
jordi
  • 91
  • 1
  • 7
3
votes
1 answer

Correction for Multiple Comparison of Means - Tukey HSD in Python

I have a dateset with 4 conditions (A, B, C, D). What I observed running a One-Way Anova is that there is a linear increase of my dependent variable (Reaction Time, RT) in the 4 conditions. I would like to run a post-hoc test to see if the increases…
giorgio-p
  • 91
  • 1
  • 5
3
votes
1 answer

Tukey HSD for categorical and continuous variables in R

I want to do a post-hoc test for a significant ANOVA I've done successfully. I have 5 conditions (target_onset) across which I want to compare reaction times (key_resp.rt) in a df called data_clean. target_onset and key_resp.rt are columns. This is…
anntree
  • 261
  • 3
  • 10
3
votes
1 answer

How to edit a Tukey test plot in R

I carried out a post-hoc Tukey test on an ANOVA and then I made a plot of the results. I can't seem to change my x axis title or my y axis title. I get this error: Error in plot.default(c(xi[, "lwr"], xi[, "upr"]), rep.int(yvals, 2L), : formal…
Emily
  • 59
  • 1
  • 4
3
votes
2 answers

selected output for Tukey's HSD in two-way ANOVA in R

I have a large data set with multiple variable. I need to do two-way-ANOVA and then post-hoc pair-wised multiple comparison using Tukey HSD. the head of my data for first 25 entry is like this: > head(my_data2, 25 ) CellType variable value 1…
Lionette
  • 83
  • 1
  • 8
3
votes
2 answers

How to generate a compact letter display for pairwise TukeyHSD

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…
Amy
  • 75
  • 1
  • 1
  • 4
3
votes
1 answer

Undefined columns selected when performing TukeyHSD

I am very new to R and coding in general, so I apologize in advance for anything that may seem silly. I performed an ANOVA and wanted to do a TukeyHSD on my data. At first, it worked fine. Then I created two data sets. In each one, I sorted my data…
Jennifer
  • 31
  • 1
  • 2
3
votes
2 answers

for loop to conduct anova test in all dataframes in a list in r

I have my dataframe: df <- read.table(text = "id G1 G2 G3 value 1 A D20 TAN 1 2 A D20 TAN 9 3 A D20 TAN 10 4 A D40 TAN 8 5 A D40 TAN 3 6 A D40 TAN 9 7 A D60 TAN 5 8 A D60 TAN 5 9 A D60 TAN 10 10 B D20 TAN…
Lennon Lee
  • 194
  • 1
  • 14
2
votes
0 answers

How to compute TukeyHSD letters for ggplot2 with multcompLetters2 when interaction results have NA values in them?

I have some data in the form of a dataframe, on which I want to perform an ANOVA and subsequent TukeyHSD. Unfortunately a few combinations between treatments:cultivars are missing. I want to compute letters for my ggplot with multcompLetters4 but am…
Rivered
  • 741
  • 7
  • 27
1
2 3
10 11