[R] varpart
Jari Oksanen
jari.oksanen at oulu.fi
Fri Aug 23 11:06:20 CEST 2013
Sibylle Stöckli <sibylle.stoeckli <at> gmx.ch> writes:
>
> I applied vegan's varpart function to partition the effects of
> explanatory matrices. Adj. R square for the unique fraction [a] is
> 0.25. Does anyone know why the decomposition by hand using rda gives
> me a different result for [a] (constrained proportion is 0.32)? I used
> cbind() for the conditional fractions, but it should be similar to
> condition()?
...
Df R.square Adj.R.square Testable
...
> [a+b+d+e+f+g] = X1+X2 40 0.64676 0.49318 TRUE
> [a+c+d+e+f+g] = X1+X3 38 0.59086 0.42546 TRUE
> [b+c+d+e+f+g] = X2+X3 20 0.36936 0.25675 TRUE
> [a+b+c+d+e+f+g] = All 49 0.69072 0.50813 TRUE
> Individual fractions
> [a] = X1 | X2+X3 29 0.25139 TRUE
...
Sibylle,
When you decompose by hand, you probably calculate
X1 | X2+X3 = All - X2+X3, or
0.32136 = 0.69072 - 0.36936,
whereas varpart function in vegan calculates this as
0.25139 = 0.50813 - 0.49318 (with smaller round-off error).
That is, vegan uses column "Adj.R.square", but you used column "R.square"
in your hand calculation.
This is documented in ?varpart with a reference to publications where
this is justified (Peres-Neto et al. 2006, Legendre & Legendre 2012).
Sorry for excessive pruning of your original post: I use gmane to
post and it does not allow appropriate quoting of the original
message.
Cheers, Jari Oksanen
More information about the R-help
mailing list