Re: [R-sig-eco] Nested Permanova with repeated measures

2015-03-17 Thread Paul Moquin
Wow- Thank you so much for this!!- I do however have a little confusion on
this part- which is well ,most of it (-:


If you want to include all weeks and examine the between-subjects effects,
then you need to use betadisper() to get the centroid across all 11 weeks
for each microcosm. 

I do indeed want to us all weeks so I did this to get the centroids for
each mesocosm:

*mc.centroids-betadisper(vegdist(community, method=bray),mesocosm) #get
mesocosm centroids *
*correct?  and now *you say Using a grouping variable (let's call it
block.treatment.combo), you can get a new matrix made up of 12 centroids,
one for each subject (mesocosm; let's call it community.centroids.among.weeks).
Using this matrix of centroids, run the following model:

Community.centroids.among.weeks ~ treatment + block

I'm afraid I was not able to follow you here! Could you provide the code
you would use there?

[[alternative HTML version deleted]]

___
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


[R-sig-eco] Nested Permanova with repeated measures

2015-03-17 Thread Paul Moquin
Hi Stephen and all Permanoverts!

Thank you for posting your thoughts about repeated measure Permanova. I am
following your methods (From Feb 25 2013- posted below) where you use
adonis for the time and time by treatment interaction and , in a seperate
step, the BiodiversityR for the main effect. When I run nested.npmanova the
p value I get for my treatment is 1.0 leading me to believe there is
something wrong- there is of course the possibility that there really is
nothing there but when I look at the plots there seems to be some kind of
treatment effect at least for 5 of the 10 speciesso if not significant
at least not p=1! I will provide a glimpse into the design and data I have
in the hopes of finding my issue.

Melting permafrost which slumps into Arctic lakes has been associated with
phisio-chemical and biological changes in these lakes. To replicate these
slumps, I ran an experiment in an unslumped Arctic lake where I
dosed mesocosms with melted permafrost soil. The experiment had three
replicates of 3 treatment levels plus a control for a total of 12
mesocosms. The experiment was set up in a randomized block design (ie 3
blocks with 4 mesocosms each- one of each treatment). I have zooplankton
community data for 11 time steps (weeks).

For a number of other univariate parameters I have used a mixed effects
model with mesocosm within block as my random terms and treatment and time
and their interaction as my main effects. (though I am not really
interested in the effect of time)

But in multivariate space I think the best I can do is:
to test time and its interaction with treatment I have

*adonis(community~week*treatment, method=bray, perm=999,strata =
enviro$mesocosm, data=enviro) *
and to test the main effect:


*library(BiodiversityR)*
*nested.npmanova(community ~treatment + mesocosm, method=bray, data
= enviro) *




Does this seem right? I acknowledge that I loose the ability to use block
here but not much I can do right?


I get this as the result of the nested model in BiodiversityR:

*Total sum of squares for non-parametric manova: 26.8071635047485 *

*Nested anova for mc nested within t.level *

*  Df   SumsofSquares   F   N.Perm
 Pr(F)   *
*treatment31.4607 0.1727  100
 1.00   *
*mesocosm  12.8188 15.8910100
 0.009901 ***
*Residuals 127   22.5277   0.1774   *
*---*
*Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1*
* *

Thank you very much

Paul Moquin



[R-sig-eco] Permanova with nested data*Steve Brewer* jbrewer at olemiss.edu
r-sig-ecology%40r-project.org?Subject=Re%3A%20%5BR-sig-eco%5D%20Permanova%20with%20nested%20dataIn-Reply-To=%3CCD50D4BB.1E27D%25jbrewer%40olemiss.edu%3E
*Mon Feb 25 16:13:18 CET 2013*


   - Previous message: [R-sig-eco] lme4 for pseudoreplication avoidance
   https://stat.ethz.ch/pipermail/r-sig-ecology/2013-February/003594.html
   - Next message: [R-sig-eco] Validation of linear regression
   https://stat.ethz.ch/pipermail/r-sig-ecology/2013-February/003597.html
   - *Messages sorted by:* [ date ]
   https://stat.ethz.ch/pipermail/r-sig-ecology/2013-February/date.html#3595
[ thread ]
   https://stat.ethz.ch/pipermail/r-sig-ecology/2013-February/thread.html#3595
[ subject ]
   
https://stat.ethz.ch/pipermail/r-sig-ecology/2013-February/subject.html#3595
[ author ]
   https://stat.ethz.ch/pipermail/r-sig-ecology/2013-February/author.html#3595

--

Beth and others,

Given several recent queries regarding how to analyze repeated-measures
and split-plot perManova using adonis, I thought I would pass along what I
think is a reasonable solution.

I just saw the recent exchange over the use of BiodiversityR to do nested
perMANOVA. I was unaware of this function until today.

With that in mind, it is possible to do a simple repeated-measures
permanova using two different analyses, one for the within-subjects
effects and one for the between-subjects effects. The same approach
applies to a simple split-plot analysis.

For the within-subjects (or sub-plot) effects, you use adonis and the
strata function. The model formula could look something like:

Assume species responses are in Speciesdata and the treatment, time, and
plot effects are in envfactors

Adonis(Speciesdata ~ betweensubtrtmt * time + plot, data = envfactors,
strata = plot)

Where plot is nested within the betweensubtrtmnt

Strata restricts the permutation, and the residual error term will give
you the correct test for the time effect and the betweensubtrtmnt * time
interaction, but the test for the betweensubtrmnt main effect will be
wrong because plot, and not the residual error term, is the correct error
term for testing it.

To get a test for the betweensubtrtmnt main effect, load the BiodiversityR
package (I use the 1.6 version, but see the recent discussion about this)
and use the nested.npmanova function