eggs_and_nests2.Rd
Subset of eggs_and_nests data the contains only Dome, Cup, and ground surface nests
eggs_and_nests2
A data frame
Taxonomic family
Taxonomic order
Genus and species
Index of how asymmetric an egg is
Index of how elliptical an egg is
Mean length of egg
nest type of species
author
ellipticity of bird in grams
....
library(ggplot2) library(ggpubr) ggpubr::ggerrorplot(eggs_and_nests2, x = "nest", y = "ellipticity", desc_stat = "mean_ci")## 1-way ANOVA ### null model model.null <- lm(ellipticity ~ 1, data = eggs_and_nests2) ### model of interest model.alt <- lm(ellipticity ~ nest, data = eggs_and_nests2) ### compare models anova(model.null, model.alt)#> Analysis of Variance Table #> #> Model 1: ellipticity ~ 1 #> Model 2: ellipticity ~ nest #> Res.Df RSS Df Sum of Sq F Pr(>F) #> 1 700 3.2337 #> 2 698 3.0981 2 0.13554 15.268 3.235e-07 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1## Tukey test ### re-fit model with aov() model.alt.aov <- aov(ellipticity ~ nest, data = eggs_and_nests2) ### TukeyHSD() on model from aov() TukeyHSD(model.alt.aov)#> Tukey multiple comparisons of means #> 95% family-wise confidence level #> #> Fit: aov(formula = ellipticity ~ nest, data = eggs_and_nests2) #> #> $nest #> diff lwr upr p adj #> Dome-Cup 0.01768136 0.003768425 0.03159430 0.0082470 #> ground surface-Cup 0.07301529 0.038175706 0.10785487 0.0000032 #> ground surface-Dome 0.05533393 0.019116251 0.09155161 0.0010362 #>### Plot effect sizes #plotTukeysHSD(TukeyHSD(model.alt.aov))