Dear Jari, Thank you for your quick reply and the time you have spent assisting with this problem. Indeed the alias tool identifies one variable that when removed from the capscale model solves the problem.
Once again greatly appreciate your assistance. Regards Steve Pawson Scientist (Entomology) Scion Forestry Rd, P.O. Box 29-237, Christchurch, New Zealand DDI +64 (0)3 3642987 Ext 4832 Cell +64 (0)27 4400727 www.scionresearch.com<http://www.scionresearch.com/> [cid:image001.png@01CC8FF1.EA1EA930] From: Jari Oksanen [via R] [mailto:ml-node+s789695n3921456...@n4.nabble.com] Sent: Thursday, 20 October 2011 11:18 p.m. To: Steve Pawson Subject: Re: Vegan: Anova.CCA accessing original data using option by= Steve Pawson <Steve.Pawson <at> scionresearch.com> writes: > > My apologies for the delay in responding to your request for further information I have been travelling for > work since you replied and have only just returned to email contact. > > The output from the traceback is as follows > # This is the capscale model that I called > > beetlecap <-capscale(log(beetles+1) ~ size + Clearfell + Absolute.Distance+ Distance_from_edge+ > clearfell.harvest_area + Canopy.Cover + X500mnative + Litter3 + X500mexotic + X5000exotic + > Condition(AdjLong + AdjLat + AdjLat.2 + AdjLat.2.long + AdjLong.3), environ, distance = "bray") > > This is the ANOVA by margin option with the error > > anova(beetlecap, by="margin") > Error in dimnames(x) <- dn : > length of 'dimnames' [2] not equal to array extent > > Corresponding traceback > > traceback() > 9: `colnames<-`(`*tmp*`, value = c("CAP1", "CAP0")) > 8: capscale(formula = log(beetles + 1) ~ size + Clearfell + Absolute.Distance > + > Distance_from_edge + clearfell.harvest_area + Canopy.Cover + > X500mnative + Litter3 + X500mexotic + X5000exotic + Condition(AdjLong + > AdjLat + AdjLat.2 + AdjLat.2.long + AdjLong.3) + Condition(size + > Clearfell + Absolute.Distance + Distance_from_edge + clearfell.harvest_area + > Canopy.Cover + Litter3 + X500mexotic + X5000exotic + AdjLong + > AdjLat + AdjLat.2 + AdjLat.2.long + AdjLong.3), data = environ, > distance = "bray") [...clip...] Dear Steve Pawson, With the help of this message I was able to construct an example that gives the same error message -- this does not prove that the cause of the problem is the same, but it is possible. It may be that your *huge* model has redundant variables that cannot be analysed in marginal test: the other variables explain all, and the marginal effect of some variables is zero. With that a high number of variables as you have, this is very likely. It seems that capscale() cannot cope with this case. I fixed capscale in http://vegan.r-forge.r-project.org and now it handles smoothly these redundant variables (skips them in permutation test, and reports df=0). From your point of view it may be unfortunate that I released a new version of vegan a couple of hours before checking R-News mail, and therefore this fix is not yet in the next release, and as we just had a release we probably (hopefully) will not have a new revision very soon. So your choices are either to use the vegan version in R-Forge (which must be at least r1958) or simplify your model so that you don't have redundant variables. One way of achieving this is to use command alias(beetlecap, names = TRUE) which will list the names of the variables that cannot be analysed. You can remove these variables without influencing your fitted model, because they really are redundant variables. Cheers, Jari Oksanen ______________________________________________ [hidden email]</user/SendEmail.jtp?type=node&node=3921456&i=0> mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ________________________________ If you reply to this email, your message will be added to the discussion below: http://r.789695.n4.nabble.com/Vegan-Anova-CCA-accessing-original-data-using-option-by-margin-tp3893005p3921456.html To unsubscribe from Vegan: Anova.CCA accessing original data using option by="margin", click here<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3893005&code=U3RldmUuUGF3c29uQHNjaW9ucmVzZWFyY2guY29tfDM4OTMwMDV8MzMzNTcwNTc1>. ________________________________ This e-mail and any attachments may contain information ...{{dropped:10}} ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.