SpaCE-Lab-MSU / warmXtrophic

This repository contains R scripts that organize, analyze, and plot data from the long term Warming X Trophic Interactions experiment at Kellogg Biological Station and University of Michigan Biological Station (UMBS).
Other
0 stars 0 forks source link

stats discussions on testing warming vs. ambient #9

Closed plzmsu closed 1 year ago

plzmsu commented 3 years ago

@dobsonk2 and @moriahy If you’d like to meet with CSTAT, that’s ok, but I can also just advise you directly which may take less time and be less confusing in the end. I think what Kara started doing in these scripts (scripts/plant_comp_scripts/greenup_analyses.R, scripts/herbivory_scripts/herbivory_analyses.R) (replicating Kileigh’s analysis with mixed effects models) is definitely the way to go if you want to be accounting for both fixed effects (the treatments) and random effects (covariates that vary by observational unit but are not necessarily what we think of as main effects). If you’re finding non-normally distributed data, you can do a permutation test instead of an F test (via anova) to test differences among means. For example: https://rdrr.io/cran/predictmeans/man/permanova.lmer.html

You may also find this of interest if you want to compare if the composition of warmed vs. ambient plots differ, or some other composition comparison: https://rpubs.com/collnell/manova

If you want to compare lots of warmed vs. ambient combinations (e.g., individually test 5 species for warm vs. ambient), then you're doing multiple comparisons with many individual tests (e.g., Tukey Test for honestly significant differences with normally distributed data or permutation test for non-normal data), and so you'll need to adjust the alpha level accordingly.

Tukey Test in R: https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/TukeyHSD Here's a site that shows how you could plot those results for a Tukey Test: https://www.r-graph-gallery.com/84-tukey-test.html

Permutation test (multiple comparisons with non-normal data): https://rdrr.io/cran/rcompanion/man/pairwisePermutationTest.html

plzmsu commented 3 years ago

To follow up on permutation tests and mixed effects models. If you haven't gone over multivariate stats yet, this will be very new:

Here is an overview of PERMANOVA in R: https://archetypalecology.wordpress.com/2018/02/21/permutational-multivariate-analysis-of-variance-permanova-in-r-preliminary/

You may also find it helpful to read a paper on a similar experiment by Jen Lau and her lab where they use both MANOVA and PERMANOVA: https://royalsocietypublishing.org/doi/10.1098/rspb.2014.0028

This paper is a pretty comprehensive overview of the stats behind permanova but it's probably more in depth than you need: https://onlinelibrary.wiley.com/doi/10.1002/9781118445112.stat07841