ANOVA between means

I want to determine whether the means of my data set are significantly different. More specifically the means of the columns: 'avecbioparticules', 'cytochalasine' and 'nocodazole'.

I need to conduct two tests: ANOVA and Tukey post-hoc.

Here's my data set followed by the mean of each test conduct:

structure(list(equipe_groupe_a = c("1_plot_2", "2_plot_4", "3_plot_9", "4_plot_10", "5_plot_14", "6_plot_12", "7_plot_13", "moyenne_groupe_a" ), sansbioparticules = c(3509.38, 3000.17, 2649.73, 3144.21, 2568.15, 3683.09, 3079.8, 3090.64714285714), avecbioparticules = c(39943.1, 196243.66, 217530.19, 208580.65, 141190.58, 36057.75, 215243.31, 150684.177142857), cytochalasine = c(7803.43, 16167.45, 35824.48, 20455.36, 63512.36, 13987.32, 22140.02, 25698.6314285714), nocodazole = c(24646.26, 110821.01, 115812.52, 180575.51, 135193.28, 25954.82, 85538.64, 96934.5771428571)), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA, -8L))

I know I've skipped steps but this is I tried so far: anova<-aov(donnees_phagocytose$moyenne_groupe_a, donnees_phagocytose)

Error in x$terms %||% attr(x, "terms") %||% stop("no terms component nor attribute") : 
  no terms component nor attribute
In addition: Warning message:
Unknown or uninitialised column: `moyenne_groupe_a`

Hello,

there are several issues present imo. First, performing an ANOVA in R requires the full data, not just the calculated means per factor group. However, you can bypass this by calculating the relevant statistical measures by yourself, if you have the sample size and standard deviation at the ready as well.

Second - you try to refer to donnees_phagocytose$moyenne_groupe_a, but according to your given data, there is no such column. This is an usual entry in the column equipe_groupe_a and hence there is your warning message.

Kind regards

Hi, thanks for your reply.
Unfortunately, this is my whole data set. What's asked is to evaluate if the means of the differents tests i.e. the columns 'avecbioparticules', 'cytochalasine' and 'nocodazole' are significantly different. That, by using an ANOVA test.
How could I perform this ?

Do you want to do something like this?

DAT <- structure(list(equipe_groupe_a = c("1_plot_2", "2_plot_4", "3_plot_9", "4_plot_10", 
                                          "5_plot_14", "6_plot_12", "7_plot_13", "moyenne_groupe_a" ), 
                      sansbioparticules = c(3509.38, 3000.17, 2649.73, 3144.21, 2568.15, 
                                            3683.09, 3079.8, 3090.64714285714), 
                      avecbioparticules = c(39943.1, 196243.66, 217530.19, 208580.65, 
                                            141190.58, 36057.75, 215243.31, 150684.177142857), 
                      cytochalasine = c(7803.43, 16167.45, 35824.48, 20455.36, 63512.36, 
                                        13987.32, 22140.02, 25698.6314285714), 
                      nocodazole = c(24646.26, 110821.01, 115812.52, 180575.51, 135193.28, 
                                     25954.82, 85538.64, 96934.5771428571)), 
                 class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA, -8L))
library(tidyr)
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
DAT_Long <- DAT |> slice(-8) |> pivot_longer(avecbioparticules:nocodazole,names_to = "Type",values_to = "Value")
DAT_Long
#> # A tibble: 21 × 4
#>    equipe_groupe_a sansbioparticules Type                Value
#>    <chr>                       <dbl> <chr>               <dbl>
#>  1 1_plot_2                    3509. avecbioparticules  39943.
#>  2 1_plot_2                    3509. cytochalasine       7803.
#>  3 1_plot_2                    3509. nocodazole         24646.
#>  4 2_plot_4                    3000. avecbioparticules 196244.
#>  5 2_plot_4                    3000. cytochalasine      16167.
#>  6 2_plot_4                    3000. nocodazole        110821.
#>  7 3_plot_9                    2650. avecbioparticules 217530.
#>  8 3_plot_9                    2650. cytochalasine      35824.
#>  9 3_plot_9                    2650. nocodazole        115813.
#> 10 4_plot_10                   3144. avecbioparticules 208581.
#> # … with 11 more rows
ANOVA_Result <- aov(Value~Type,data = DAT_Long)
summary(ANOVA_Result)
#>             Df    Sum Sq   Mean Sq F value  Pr(>F)   
#> Type         2 5.503e+10 2.752e+10   8.109 0.00308 **
#> Residuals   18 6.108e+10 3.393e+09                   
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Created on 2022-10-16 with reprex v2.0.2

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.