Nevil Amos <nevil.amos <at> monash.edu> writes: > > I am getting the following erro rmessage in ordistep. I have a number of > similarly structured datasets using ordistep in a loop, and the message > only occurs for some of the datasets. > > I cannot include a reproducible sample - the specific datasets where this > is occur ing are fairly large and there are several pcnm's in the rhs of > the formula. > > Error in if (aod[1, 5] <= Pin) { : missing value where TRUE/FALSE needed > Nevil,
It seems to me that the source of the problem appears in this table: > Inertia Proportion Rank > Total 1.8110 1.0000 > Conditional 0.8681 0.4793 32 > Constrained 0.0000 0.0000 0 > Unconstrained 0.9429 0.5207 29 > Inertia is variance > Some constraints were aliased because they were collinear (redundant) > The key point is that "Constrained" component is completely alaised (Inertia 0, Rank 0) and therefore it cannot be analysed in permutation tests. You get the same error message with this model: mod <- rda(dune ~ Moisture + Condition(Moisture), dune.env) and for the same reason. In your case, PCNM's seem to explain everything and there is nothing left for other variables, and therefore you cannot analyse them. Cheers, Jari Oksanen I can see how to fix this in vegan. All I can do is to handle these cases smoothly and with comprehensible error messages, though. They cannot be handled with permutation tests since there is nothing to do if "Constrained" component is zeroed. Cheers, Jari Oksanen ______________________________________________ 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.