[R-sig-eco] Partitioning spatial effects using trend surface analysis or PCNM

Gavin Simpson ucfagls at gmail.com
Wed May 6 17:48:04 CEST 2015


Hi Tim

On 6 May 2015 at 03:47, trichter <trichter at uni-bremen.de> wrote:

> Thank you very much for adressing my problem.
>
> Maybe i can re-formulate it in a different way - moving away from
> specific partial CCA/RDAs to the core of my task.
>
> If said task is the approximate quantification of partial effects on my
> bacterial counts (for example edaphic soil properties, above-ground
> plant diversity, and spatial autocorrelation) via the varpart function
> in vegan, is the classical way of having orthogonal polynomes of the x,y
> axis as CCA/RDA constraints still considered valid?
>

It is and remains valid; it just isn't set-up to find as wide a range of
spatial patterns as PCNM. Now that may not be a bad thing in its entirety;
we don't have a good way of doing feature selection in constrained
ordination (and I don't consider the global R2 test followed by forward
selection via R2 as a "good" method, it's just better than bog standard
forward selection). Throwing a large set of PCNMs at an ordination sounds
like a recipe for data dredging, *unless* you are very careful.


> If i understand you correctly, i would alternatively:
> - generate PCNMs from my x,y coordinate matrices
> - extract those with a Moran I >0
> - perform a RDA/CCA with forward selection
> - use the PCNM found to be significant in the varpart function?
>
> I think the only forward selection for CCA would be ordistep function in
> vegan. What would be an acceptable treshold for entering into my final
> set of accepted significant PCNMs?
>

Correct; the "newer" approach uses an adjusted R2 measure which has only
been worked out and implemented for the RDA case.

Rather than a 0.05 threshold as the baseline, I would go to say 0.01 as the
threshold for inclusion. Then you also need to account for multiple testing
so you adjust this p-value at each step in the forward selection process.


> The other problem is that on the one hand, RDA is not able to separate
> my community shifts as well as CCA, on the other hand varpart is based
> on RDA. I wonder if i can justify using varpart when my ordination of
> choice is based on CCA. But i have never seen a dedicated variance
> partition function for CCA. I just read an old answer of yours:
>
> http://r.789695.n4.nabble.com/partitioning-variation-using-the-Vegan-CCA-routine-td823966.html
>
> So, i can basically transform my raw data to chi2 and use them in an RDA
> to have a CCA proxy?
>

Yes; Pierre Legendre & Eugene Gallagher showed how this could be done in
their 2001 Oecologia paper on Ecologically Meaningful Transformations. You
won't get exactly a CCA by doing RDA on chi-square transformed data, but it
will be close. You can also use the Hellinger transformation which worked
well in the tests that Legendre & Gallagher did in their paper.


>
> Thank you very much! as you can see, i am not really trained in statistics.
>

You're welcome,

G


> Tim
>
>
>
> On 06.05.2015 02:45, Gavin Simpson-2 [via r-sig-ecology] wrote:
> > Hi "trichter"
> >
> > On 5 May 2015 at 13:34, trichter <[hidden email]
> > </user/SendEmail.jtp?type=node&node=7579428&i=0>> wrote:
> > <snip />
> >
> > > Here is what i do:
> > >
> > > spat <- as.data.frame(poly(as.matrix(spatxy), degree=3))
> > >
> > > cca1_s <- cca(OTU~., data=spat)
> > > #significances
> > > anova(cca1_s)
> > > anova(cca1_s, by="term", perm=999)
> > >
> >
> > Don't think last analysis makes much sense; if you have a cubic
> > polynomials
> > plus interactions you should only consider the interactions first for
> > removal, then decide if quadratic rather than cubic are needed
> >
> >
> > >
> > > #forward selection for most parsimonious model
> > > cca1_s.f <- ordistep(cca(OTI~1, data=spat), scope=formula(cca1_s),
> > > direction="forward", pstep=1000)
> > > sig1_s.f <- anova(cca1_s.f, by="term", perm=999)
> > >
> >
> > Again, as above, you have to be very careful with this. Just because you
> > made a matrix with 9 "covariates" it doesn't mean it makes sense to
> > cherry
> > pick from these terms.
> >
> >
> > > The result is a significant CCA object. Spat is usuable in VarPart and
> > > yields a low but significant value for overall autocorrelation.
> > >
> > > For PCNM i do
> > >
> > > rs <- rowSums(OTU)/sum(OTU)
> > > pcnmw <- pcnm(dist(spatxy), w = rs)
> > > cca1_pcnm <- cca(acido1 ~ scores(pcnmw))
> > >
> > > pcnmw consists of 250 vectors, and the result is a non-significant CCA
> > > object, where i expected a "finer" spatial decomposition.
> > >
> >
> > You are supposed to choose from among the set of PCNMs which explain the
> > species data best, not use them all in the model. The problem appears
> > to be
> > that you have a model that is far too complex with lots of redundant axes
> > (or more likely too few constraints).
> >
> > One suggestion is to use only those PCNMs that have positive spatial
> > correlation. Compute that using Moran's I of which there are a few
> > implementations around in various R packages. You can do CCA analysis
> > with
> > the positive spatial correlation PCNMs separately from the negatively
> > correlated PCNMs if you wish.
> >
> > You will probably need to do some type of forward selection but the
> > preferred method seems to be limited to RDA (because the adjusted R2
> > measure used in the global significance test isn't worked out for
> > CCA). If
> > you skip the global test, you could just do forward selection on the
> > positive PCNMs, but you probably want to try to control for accepting too
> > many PCNMs by having low entry threshold for significance.
> >
> > HTH
> >
> > G
> >
> >
> >
> > > The same is true if i am using total count data (hellinger
> > transformed or
> > > not).
> > >
> > > I am sure i am doing it wrong, so if you have advise to properly do the
> > > calculation, please let me know. Thank you for the help.
> > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://r-sig-ecology.471788.n2.nabble.com/Partitioning-spatial-effects-using-trend-surface-analysis-or-PCNM-tp7579427.html
> > > Sent from the r-sig-ecology mailing list archive at Nabble.com.
> > >
> > > _______________________________________________
> > > R-sig-ecology mailing list
> > > [hidden email] </user/SendEmail.jtp?type=node&node=7579428&i=1>
> > > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> > >
> >
> >
> >
> > --
> > Gavin Simpson, PhD
> >
> >         [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-ecology mailing list
> > [hidden email] </user/SendEmail.jtp?type=node&node=7579428&i=2>
> > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> >
> >
> > ------------------------------------------------------------------------
> > If you reply to this email, your message will be added to the
> > discussion below:
> >
> http://r-sig-ecology.471788.n2.nabble.com/Partitioning-spatial-effects-using-trend-surface-analysis-or-PCNM-tp7579427p7579428.html
> >
> > To unsubscribe from Partitioning spatial effects using trend surface
> > analysis or PCNM, click here
> > <
> http://r-sig-ecology.471788.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7579427&code=dHJpY2h0ZXJAdW5pLWJyZW1lbi5kZXw3NTc5NDI3fDU5NDI0ODAyNg==
> >.
> > NAML
> > <
> http://r-sig-ecology.471788.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
>
> --
> Tim Richter-Heitmann (M.Sc.)
> PhD Candidate
>
>
>
> International Max-Planck Research School for Marine Microbiology
> University of Bremen
> Microbial Ecophysiology Group (AG Friedrich)
> FB02 - Biologie/Chemie
> Leobener Straße (NW2 A2130)
> D-28359 Bremen
> Tel.: 0049(0)421 218-63062
> Fax: 0049(0)421 218-63069
>
>
>
>
>
> --
> View this message in context:
> http://r-sig-ecology.471788.n2.nabble.com/Partitioning-spatial-effects-using-trend-surface-analysis-or-PCNM-tp7579427p7579431.html
> Sent from the r-sig-ecology mailing list archive at Nabble.com.
>         [[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
>



-- 
Gavin Simpson, PhD

	[[alternative HTML version deleted]]



More information about the R-sig-ecology mailing list