[R-sig-eco] Repeated measures RDA in vegan

Gavin Simpson gavin.simpson at ucl.ac.uk
Tue Oct 4 11:59:40 CEST 2011


On Mon, 2011-10-03 at 12:57 +1100, Lien Sim wrote:
> Hi,
> 
> I am trying to run a repeated measures RDA in vegan but am unsure about how
> to implement this, and whether I also need to use the permute package to run
> permutations.

Technically yes, you should be using a restricted, but as yet we vegan
developers have not hooked permute into most of the functions in the
package that use permutation tests, like the anova() method for cca
objects.

Until we do this, the best you can do is use the strata argument to at
least stratify the permutations on your 9 sites (i.e. samples will only
be exchanged within a site, not between sites.) When we get permute
fully hooked into vegan, you would still use strata, but keep the Block
level (strata) fixed and set the Within level to use cyclic shift
permutations rather than randomisation.

The change you need to make to permutest.cca is relatively simple, if
you know the workings of that function and permute and only want to
implement this one type of permutation.

Doing this in general for all the types of permutation offered is a
little bit more work and is something I will be embarking upon next
month.

You should split the Site/Date info out into a Site factor and a Date.
permute doesn't know anything about Dates/Times, so you will need to put
the samples into temporal order within Sites. As I develop permute and
learn from the experiences of getting vegan to use it more, we may be
able to expand the API to allow you to specify a variable that indicates
the ordering.

I'm quite busy with work and teaching till the end of October, so I
can't guarantee I will be able to help quickly, but if you would like
some help producing a local/personal version of permutest.cca for this
one type of permutation, please email me off list with the data and I'll
see about writing a version for you.

HTH

G

> I have time series data  - one data frame with community composition data
> (aquatic invertebrates) for 9 sites sampled on 16 dates (not all site/dates
> combinations have data), then another data frame with environmental
> constraints (water quality data) for the same 9 sites and 16 dates. At first
> I ran the analysis as a fairly simple RDA using
> JInvRDA <- rda(JInvHel ~ ., JEnvT.stand, na=na.omit, subset =
> complete.cases(JInvHel), scale=TRUE)
> 
> where JInvHel - Hellinger-transformed invertebrate data
> JEnvT.stand - transformed and standardised environmental data
> 
> I then ran permutation tests on the output using
> anova.cca (JInvRDA, step=1000)
> 
> However, I have since realised that since my data are time series and likely
> to be temporally autocorrelated, that I should be using a repeated measures
> type RDA e.g. a split plot design in which permutations are performed within
> each block of plots (sites). In my searching I have seen lots of mention of
> the two references below, which outline examples of this analysis using
> CANOCO, but am not sure how to do this in R.
> 
> Lepš, J. 1999. Nutrient status, disturbance and composition: an experimental
> test of relationships in a wet meadow. J. Veg. Sci. 10: 219–230.
> Leps, J. & Smilauer, P. 2003. Multivariate analysis of ecological data using
> CANOCO. Cambridge University Press, Cambridge, UK.
> 
> I am unsure about whether I need to reorganise my data frames (currently
> samples (first column) are coded with a combined site/date code - does this
> need to be split so that sites and dates are separate - into two columns?)
> and also about how to structure the analysis so that the time component is
> incorporated correctly. Finally, when I want to run permutation tests,
> should I be using the permute package, and how should this be structured?
> 
> Many thanks,
> Lien
> 
> 	[[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

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-sig-ecology mailing list