[R-sig-eco] WG: Re: clustering with random effect

Jari Oksanen jari.oksanen at oulu.fi
Fri Apr 3 14:09:27 CEST 2009


On Fri, 2009-04-03 at 09:29 +0200, Jana Buerger wrote:
> David,
> 
> to be honest I have used the terminology of sites and species only
> analogously to make it easier to explain what a method I'm looking for.
> 
> In fact, I'm analysing pesticide use data. my sites are different
> fields, the species are different pesticide treatments, for example a
> number of fungicide treatments. Data in the matrix are numbers between
> approx. 0 and 2.5 and stand for the amount of the treatment. There are
> many fields from altogether 7 farms.
> Now, i used clustering and PCA for analysing patterns of treatment,
> and afterwards RDA to find important crop management factors influencing
> patterns.
> 
> As I described inthe original post, in an RDA with a conditioning term
> on "Farm" (or study area) the clusters don't separate anymore as in
> unconditioned RDA.
> 
> Now, I wonder if I can have a clustering of sites with a conditioning
> term on "Farm" sort of removed before clustering.
> 
Dear Jana Buerger,

You cannot get a residual ordination response *with* newdata in vegan.
Not yet at least, or not easily: in principle, you can if you know how
to do this. I know because I have done so for another purpose just this
week, but I haven't (yet) implemented that in the public versions of the
package. There are many aspects of the complexity of the user commands
that must be solved first, and then I should think if this increase of
complexity is worth the new features.

There are no real random factors in rda in vegan. You can have
Condition() which "partials out" all variation of some variables, but it
does not do that in a random factor way, but it removes that variation
similarly as for fixed terms. This means that if some constraints are
constant for some conditions, the conditions are aliased and cannot be
analysed independently.

An approach more similar to clustering variables is to stratify the
permutations within clusters. You do not change the fitted model, but
you evaluate its significance honouring the cluster structure in the
data. In current vegan you can already have simple cases by adding a
'strata' argument to the permutation tests. We (or actually Gavin
Simpson) have also worked on more sophisticated permutation schemes, but
we haven't (yet) migrated the anova.cca functions or other permutation
routines to use those more sophisticated schemes. The permutation
schemes are already in vegan as function permuted.index2, but you must
use them manually. Perhaps the simple one level 'strata' argument is
sufficient for some of your needs.

Best wishes, Jari Oksanen

-- 
Jari Oksanen <jari.oksanen at oulu.fi>



More information about the R-sig-ecology mailing list