[quote="FJCC, post:4, topic:62035"]
Thanks you FJCC for the suggestion. However, whenI apply it to my own that it does't work. I instead have the following result:
> FIT <- lm(NestGroupSize ~ VegetationType2, data = dataframe1)
> library(broom)
> TidyFit <- tidy(FIT)
> TidyFit
# A tibble: 4 x 5
term estimate std.error statistic p.value
<chr> <dbl> <dbl> <dbl> <dbl>
1 (Intercept) 3.81 0.267 14.3 1.35e-30
2 VegetationType2Open forest 1.14 0.447 2.55 1.16e- 2
3 VegetationType2Wooding sav~ 0.332 0.461 0.720 4.73e- 1
4 VegetationType2Secondary f~ -0.815 2.42 -0.337 7.37e- 1
> TidyFit$term <- c("Mature forest", " Wooding savannah", " Open forest", "Secondary forest", "Grass savannah", "Swampy Zone"," Semi-Swampy zone")
Error in `$<-.data.frame`(`*tmp*`, term, value = c("Mature forest", " Wooding savannah", :
replacement has 7 rows, data has 4
> TidyFit$term <- factor(TidyFit$term, levels = c("Mature forest", "Wooding savannah", " Open forest", "Secondary forest", "Grass savannah", "Swampy Zone", "Semi-Swampy zone"), ordered = TRUE)
> Offset <- TidyFit[1, "estimate", drop = TRUE]
> TidyFit[4:7, "estimate"] <- TidyFit[4:7, "estimate"] + Offset
> TidyFit$Symbols <- c( "A", "B", "C","AB","BA","CB", "AC")
> TidyFit
# A tibble: 7 x 6
term estimate std.error statistic p.value Symbols
* <ord> <dbl> <dbl> <dbl> <dbl> <chr>
1 NA 3.81 0.267 14.3 1.35e-30 A
2 NA 1.14 0.447 2.55 1.16e- 2 B
3 NA 0.332 0.461 0.720 4.73e- 1 C
4 NA 3.00 2.42 -0.337 7.37e- 1 AB
5 NA NA NA NA NA BA
6 NA NA NA NA NA CB
7 NA NA NA NA NA AC
I would like to remind that my goal cpnsist to compare factors means from anova with a bargraph associated to leters. Factors in the graph previously attached with same letters indicate that there is not signifacnt difference among them.
Thanks
Thanks