[R-sig-eco] Capscale: Centroids ignored with Condition() in formula

Jari Oksanen jari.oksanen at oulu.fi
Fri Dec 17 06:37:29 CET 2010


Michael,

Sorry for top posting, but with this structure of email it seems to be the
only sensible way of continuing.

I cannot see any problem, but I only see a situation, and quite a normal
situation. You have a model of type capscale(Y ~ A + Condition(A %in% B)).
Here A appears twice: its effectsare removed first in Condition() and then
you try analyse its residul effects, but no effect of A remains because they
were already removed. In this case, no constrained component is calculated
and you won't get explicit information on skipping this stage. Situation is
different if some constrained variation is left: in capscale(Y ~ A + x +
Condition(A %in% B)) you will get a constrained component showing effects of
x on residual and information that A was aliased. So no effect of A, but
info that it cannot be calculated. All that we could do for the first case
is to return an empty constrained component with information why it is
empty. 

The same situation continues with partially aliased models. For instance, in
vegan standard example capscale(dune ~ Management + Condition(Manure)), the
effects of Management level NM (Natural Management) cannot be displayed
because you have partialled out Manure, and Manure level = 0 (no manure)
only occurs with Management = NM. So you alias away ManagementNM. This seems
to be the case with your later message update below.

If you remove something by partialling out, then you remove it. If you
removed it, you cannot analyse its effects. That is how these models work
and how they were designed to work.

Cheers, Jari Oksanen

On 17/12/10 03:27 AM, "Wilson, Michael E" <mwilso14 at utk.edu> wrote:

> Update:
> I think I tracked down the problem, but don't know how to fix it.
> Using Condition() works fine with any of my other variables.
> 
> But, now I see that in this model
> bees ~ FlowerType + condition(Transect)
> 
> While there are multiple observations on an given Transect, each transect has
> only one of numerous possible flower types.
> 
> And (I think this is the problem) some FlowerTypes only occur in one Transect.
> While other FlowerTypes are represented in multiple Transects. So for the
> FlowerTypes that only occur in one Transect, the repeated measures on those is
> the residual and must be messing up the analysis. Is that right?
> 
> If so, any suggestions on how to resolve the problem?
> 
> Thanks
> Michael Wilson
> 
> ------------------------------
> -----------------------------
> copied my first message below
> -------------------------------
> 
> 
> Hi, I'm having a problem with Capscale in Vegan.
> 
> When adding a Condition() statement in my formula, the Constraint in the
> formula seems to be ignored. I don't know if this is a problem with my
> formula, a bug, or if I don't understand something else.
> 
> Here is my R statement
> 
> bees.cap <- capscale(bees ~ FlowerType + Condition(Transect %in% FlowerType),
> envir, distance = "morisita", add=TRUE)
> 
> In my data, there are multiple observations at sites (Transect). Each site has
> one possible class factor (FlowerType). capscale works fine removing the
> Condition, and produces Scores for $Centroids. No Scores are produced for
> $Centroids when Condition is used. Strangely (to me anyway) the following
> three formulas give the same results.
> 
> bees ~ Condition(Transect)
> bees ~ Transect + Condition(Transect %in% FlowerType)
> bees ~ FlowerType + Condition(Transect)
> bees ~ FlowerType + Condition(Transect:FlowerType)
> 
> The plot it produces the above produces is beautiful and agrees with what I
> observed in the field.
> 
> A plot without the Condition does agree with my sense of what I observed in
> the field, but the plot has a bad horeshoe, does not account for observations
> at the same Transect, and is harder to look at.
> 
> Does anyone have solutions/explanations?
> 
> Thank you so much.
> Michael Wilson
> 
> 
> 
> 
> [[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



More information about the R-sig-ecology mailing list