[R-sig-eco] Running MANCOVA in R

Livingston, Laura laura.livingston at wsu.edu
Tue Feb 7 07:31:47 CET 2017


Hello everyone,


I am a new user on the r-sig-ecology group. I have been working a community dataset that contains 257 invertebrate genera sampled across 3 categories of streams and a variety of stream temperatures. My committee member recommended that I run a MANCOVA on the dataset to see whether there was a difference among the 3 categories of streams using stream temperature as a co-variate. However, I have been searching on how to run a MANCOVA in R without much luck. Has anyone come across this problem before?


The closest example that I have been able to find is at this link: https://stat.ethz.ch/pipermail/r-sig-ecology/2011-November/002553.html.


Using my test data and following that example I wrote:


library(vegan)

library(car)

library(dplyr)


Data <- read.csv("MANCOVA_testData.csv")

Community <- Data %>% dplyr::select(-VisitID:StreamTemp)

Community_dissimilarity <- vegan::vegdist(Community,method="bray")


MANCOVA <- car::ANOVA(lm(as.matrix(Community_dissimilarity) ~ Data$Category + Data$StreamTemp))

summary(MANCOVA)


When I run this code, I get an error. Thoughts?

[R-sig-eco] MANCOVA in R - SfS – Seminar for Statistics<https://stat.ethz.ch/pipermail/r-sig-ecology/2011-November/002553.html>
stat.ethz.ch
On Fri, 2011-11-25 at 10:47 +0100, marcelino.delacruz at upm.es wrote: > Hi, > > maybe adonis? e.g., > > library(vegan) > adonis(Y~Lat+Lat2+Year+Lat:Year+Lat2:Year ...




Sincerely,

Laura

M.S. student, Environmental Science


More information about the R-sig-ecology mailing list