[R-sig-eco] anova.cca question / missing data in constraining matrix

ckellogg ctekellogg at gmail.com
Sat Jun 1 01:10:36 CEST 2013


Hello,
I am using the cca function in Vegan to examine the relationship between
microbial community structure and a (large) suite of environmental
variables.  My constraining/environmental data matrix as a lot of holes in
it so I have been exploring using the na.action argument. 
This is the command I am currently using:
toolik250.cca<-cca(toolikotus250.ra~julianday+logwindspd_max_1dayprior+lograin_3dayprior+sqrtwindspd_1dayprior+windspd_3dayprior+days_since_thaw+days_since_iceout+days_btw_iceoutandthaw+toolikepitemp_24h+logtemp+conductivity+pH,
toolikenv.s, na.action=na.omit)

The CCA seems to run just fine, but when I attempt to do the posthoc tests
such as anova.cca (anova(toolik250.cca,by='terms',perm=999), I get an error
message: "Error in anova.ccabyterm(object, step = step, ...) : number of
rows has changed: remove missing values?"  What exactly is occurring here to
cause this error - I suspect it must be related to the fact that the
environmental data matrix has a lot of missing data.  I don't quite
understand why it states that the number of rows has changed...changed from
what?  Is there any way to get around having missing data when running the
anovas as you can when running the CCA itself?

One other question I have is when I try and run the CCA on all the data in
my environmental data matrix (toolikenv.s), not just a subset of variables
as I do above, using this command:
toolik250.cca <-cca(toolikotus250.ra~., toolikenv.s, na.action=na.omit)
I get the following error message.  "Error in svd(Xbar, nu = 0, nv = 0) : a
dimension is zero" What might be causing this error message to be thrown?

Thank you so much for your help.  Maybe I will just have to filter out the
samples with missing environmental data (or filter out some of the variables
themselves if they have too much missing data), but I was just hoping to
avoid having to do this.

Colleen



--
View this message in context: http://r-sig-ecology.471788.n2.nabble.com/anova-cca-question-missing-data-in-constraining-matrix-tp7578175.html
Sent from the r-sig-ecology mailing list archive at Nabble.com.



More information about the R-sig-ecology mailing list