I created an NMDS plot using ggplot with ellipses corresponding to my different groups (I have three years and two treatments; different treatment have different ellipse outline and symbol while different years have different ellipse color and symbol color).
Here is my code:
ggplot(nmds, aes(x=nmds1, y=nmds2, col=group)) +
geom_point(aes(shape=group)) +
stat_ellipse(aes(x = nmds1,y=nmds2, fill=group, linetype=group), geom="polygon", alpha=0.2, segments=201) +
scale_linetype_manual(values=c(1,2,1,2,1,2)) + scale_fill_manual(values=c("maroon","maroon","steelblue2","steelblue2","seagreen", "seagreen")) + scale_colour_manual(values=c("maroon","maroon","steelblue2","steelblue2","seagreen", "seagreen")) +
scale_shape_manual(values=c(1,2,1,2,1,2))
I want to see if my three ellipses for one treatment are significantly smaller than the three ellipses for the other treatment. How can I compute their area? I could then use a t-test to test for significant difference.