Re: [R-sig-eco] 2-way adonis (PERMANOVA) incl interaction - how to test for main effects?

2018-10-16 Thread Jari Oksanen
vegan::adonis2 only handles marginal effects with by = “margin” (and hence only 
term A:B of A*B), but RVAideMemoire package has function adonis.II that also 
can do “type II” and “type III” tests (what ever these mean with adonis) which 
may be something you are looking for. I haven’t checked how these tests were 
implemented, but you may do that in your leisure if you think this is what you 
want to have.

Cheers, Jari Oksanen

> On 16 Oct 2018, at 14:53 pm, Ellen Pape  wrote:
> 
> Hi,
> 
> I know that A*B = A+B+A:B, but in this case, i.e. doing an adonis2 and
> specifying by="terms" will only do the test for the interaction, not the
> main effects. If one chooses by="terms", you will get a test for the main
> effects and the interaction, but than the order of factors matters.
> 
> Best regards
> Ellen
> 
> On Tue, 16 Oct 2018 at 12:23, Torsten Hauffe 
> wrote:
> 
>> "adonis2(speciesdataset~A*B, by="margin") but then only the effect of the
>> interaction is tested."
>> 
>> This is not entirely correct.
>> adonis2(speciesdataset~A:B, by="margin") would test the interaction
>> alone.  ~A*B unfolds to ~A+B+A:B
>> 
>> On Tue, 16 Oct 2018 at 11:51, Ellen Pape  wrote:
>> 
>>> Hi all,
>>> 
>>> I don't know whether this is the correct mailing group to address this
>>> question:
>>> 
>>> I would like to perform a 2-way permanova analysis in R (using adonis in
>>> vegan). By default you are performing sequential tests (by="terms"), so
>>> when you have 2 or more factors, the order of these factors matter.
>>> However, since I wanted to circumvent this, I chose for the option
>>> by="margin" (adonis2(speciesdataset~A*B, by="margin")) but then only the
>>> effect of the interaction is tested. On the "help page" of anova. cca it
>>> says: "if you select by="margin" -> the current function only evaluates
>>> marginal terms. It will, for instance, ignore main effects that are
>>> included in interaction terms."
>>> 
>>> 
>>> My question now is: can I somehow get the main effects tested anyhow, when
>>> the interaction term is not significant?
>>> 
>>> Thanks,
>>> Ellen
>>> 
>>>[[alternative HTML version deleted]]
>>> 
>>> ___
>>> R-sig-ecology mailing list
>>> R-sig-ecology@r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>>> 
>> 
> 
>   [[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-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


Re: [R-sig-eco] 2-way adonis (PERMANOVA) incl interaction - how to test for main effects?

2018-10-16 Thread Torsten Hauffe
I see. Thanks for explaining Jari!

On Tue, 16 Oct 2018 at 14:54, Jari Oksanen  wrote:

>
>
> On 16/10/18 11:23, Torsten Hauffe wrote:
> >   "adonis2(speciesdataset~A*B, by="margin") but then only the effect of
> the
> > interaction is tested."
> >
> > This is not entirely correct.
> > adonis2(speciesdataset~A:B, by="margin") would test the interaction
> alone.
> > ~A*B unfolds to ~A+B+A:B
>
> Well, it was correct: the only **marginal** effect in ~A+B+A:B is A:B (A
> and B are not marginal), and by = "margin" will only analyse marginal
> effects.
>
> Cheers, Jari Oksanen
> >
> > On Tue, 16 Oct 2018 at 11:51, Ellen Pape  wrote:
> >
> >> Hi all,
> >>
> >> I don't know whether this is the correct mailing group to address this
> >> question:
> >>
> >> I would like to perform a 2-way permanova analysis in R (using adonis in
> >> vegan). By default you are performing sequential tests (by="terms"), so
> >> when you have 2 or more factors, the order of these factors matter.
> >> However, since I wanted to circumvent this, I chose for the option
> >> by="margin" (adonis2(speciesdataset~A*B, by="margin")) but then only the
> >> effect of the interaction is tested. On the "help page" of anova. cca it
> >> says: "if you select by="margin" -> the current function only evaluates
> >> marginal terms. It will, for instance, ignore main effects that are
> >> included in interaction terms."
> >>
> >>
> >> My question now is: can I somehow get the main effects tested anyhow,
> when
> >> the interaction term is not significant?
> >>
> >> Thanks,
> >> Ellen
> >>
> >>  [[alternative HTML version deleted]]
> >>
> >> ___
> >> R-sig-ecology mailing list
> >> R-sig-ecology@r-project.org
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> >>
> >
> >   [[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-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

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


Re: [R-sig-eco] 2-way adonis (PERMANOVA) incl interaction - how to test for main effects?

2018-10-16 Thread Jari Oksanen



On 16/10/18 11:23, Torsten Hauffe wrote:
>   "adonis2(speciesdataset~A*B, by="margin") but then only the effect of the
> interaction is tested."
> 
> This is not entirely correct.
> adonis2(speciesdataset~A:B, by="margin") would test the interaction alone.
> ~A*B unfolds to ~A+B+A:B

Well, it was correct: the only **marginal** effect in ~A+B+A:B is A:B (A 
and B are not marginal), and by = "margin" will only analyse marginal 
effects.

Cheers, Jari Oksanen
> 
> On Tue, 16 Oct 2018 at 11:51, Ellen Pape  wrote:
> 
>> Hi all,
>>
>> I don't know whether this is the correct mailing group to address this
>> question:
>>
>> I would like to perform a 2-way permanova analysis in R (using adonis in
>> vegan). By default you are performing sequential tests (by="terms"), so
>> when you have 2 or more factors, the order of these factors matter.
>> However, since I wanted to circumvent this, I chose for the option
>> by="margin" (adonis2(speciesdataset~A*B, by="margin")) but then only the
>> effect of the interaction is tested. On the "help page" of anova. cca it
>> says: "if you select by="margin" -> the current function only evaluates
>> marginal terms. It will, for instance, ignore main effects that are
>> included in interaction terms."
>>
>>
>> My question now is: can I somehow get the main effects tested anyhow, when
>> the interaction term is not significant?
>>
>> Thanks,
>> Ellen
>>
>>  [[alternative HTML version deleted]]
>>
>> ___
>> R-sig-ecology mailing list
>> R-sig-ecology@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>>
> 
>   [[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-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


[R-sig-eco] Phylogenetic comparative methods for studying diversification and phenotypic evolution

2018-10-16 Thread Oliver Hooker

I thought this course might be of interest to some page members...

Phylogenetic comparative methods for studying diversification and 
phenotypic evolution (PCME01)


https://www.prstatistics.com/course/phylogenetic-comparative-methods-for-studying-diversification-and-phenotypic-evolution-pcme01/

This course will be delivered by Dr. Antigoni Kaliontzopoulou from the 
5th - 8th November 2018 in Glasgow City Centre.


Course Overview:
Phylogenetic comparative methods are commonly used nowadays to 
investigate how species diversification occurs and to test hypotheses 
about the mechanisms that drive phenotypic evolution, e.g. to model 
speciation and extinction, to understand why some groups are more 
diverse than others, to test whether phenotypic traits have evolved 
under neutral, directional or diversifying selection, to investigate how 
evolutionary rates are modified across the evolutionary history of a 
group etc. In all these cases, a phylogenetic hypothesis for the group 
of interest is combined to phenotypic and ecological data at the species 
level to understand the tempo and mode of evolutionary change.
The objective of this course is to provide an overview of these methods 
and of the tools available for their implementation in the R statistical 
language. During theoretical sessions, we will review the main concepts 
and statistical tools necessary for testing hypotheses about species 
diversification and phenotypic evolution. These will then be implemented 
during practicals through worked examples to provide the participants 
with hands-on experience on data management and the implementation of 
these methods to real biological data.


Monday 5th – Classes from 09:30 – 17:30
Introduction
1-1) Why do we need PCMs? A short history of the field
1-2) Testing for phylogenetic signal
1-3) Ancestral character reconstruction
1-4) PRACTICALS

Tuesday 6th – Classes from 09:30 – 17:30
Testing hypotheses on phenotypic evolution
2-1) Phylogenetic independent contrasts and phylogenetic GLS
2-2) Phylogenetically-informed ordination
2-3) PRACTICALS

Wednesday 7th – Classes from 09:30 – 17:30
Tempo and mode of evolutionary change
3-1) Evolutionary rates: estimation and tests
3-2) Models of phenotypic evolution
3-3) PRACTICALS

Thursday 8th – Classes from 09:30 – 16:00
Miscellanea
4-1) Modelling lineage diversification
4-2) Future perspectives: multivariate extensions to PCMs
4-3) PRACTICALS

Email oliverhoo...@prstatistics.com
Check out our sister sites,
www.PRstatistics.com (Ecology and Life Sciences)
www.PRinformatics.com (Bioinformatics and data science)
www.PSstatistics.com (Behaviour and cognition)


1.  October 15th – 19th 2018
APPLIED BAYESIAN MODELLING FOR ECOLOGISTS AND EPIDEMIOLOGISTS (ABME04)
Glasgow, Scotland, Dr. Matt Denwood, Emma Howard
http://www.prstatistics.com/course/applied-bayesian-modelling-ecologists-epidemiologists-abme04/

2.  October 23rd – 25th 2018
INTRODUCTIUON TO R (This is a private ‘in-house’ course)
London, England, Dr William Hoppitt

3.  October 29th – November 2nd 2018
INTRODCUTION TO R AND STATISTICS FOR BIOLOGISTS (IRFB02)
Glasgow, Scotland, Dr. Olivier Gauthier
https://www.prstatistics.com/course/introduction-to-statistics-and-r-for-biologists-irfb02/

4.  October 29th – November 2nd 2018
INTRODUCTION TO BIOINFORMATICS FOR DNA AND RNA SEQUENCE ANALYSIS 
(IBDR01)

Glasgow, Scotland, Dr Malachi Griffith, Dr. Obi Griffith
www.prinformatics.com/course/precision-medicine-bioinformatics-from-raw-genome-and-transcriptome-data-to-clinical-interpretation-pmbi01/

5.  November 5th – 8th 2018
PHYLOGENETIC COMPARATIVE METHODS FOR STUDYING DIVERSIFICATION AND 
PHENOTYPIC EVOLUTION (PCME01)

Glasgow, Scotland, Dr. Antigoni Kaliontzopoulou
https://www.prstatistics.com/course/phylogenetic-comparative-methods-for-studying-diversification-and-phenotypic-evolution-pcme01/

6.  November 19th – 23rd 2018
STRUCTUAL EQUATION MODELLING FOR ECOLOGISTS AND EVOLUTIONARY BIOLOGISTS 
(SEMR02)

Glasgow, Scotland, Dr. Jonathan Lefcheck
https://www.prstatistics.com/course/structural-equation-modelling-for-ecologists-and-evolutionary-biologists-semr02/

7.  November 26th – 30th 2018
FUNCTIONAL ECOLOGY FROM ORGANISM TO ECOSYSTEM: THEORY AND COMPUTATION 
(FEER01)
Glasgow, Scotland, Dr. Francesco de Bello, Dr. Lars Götzenberger, Dr. 
Carlos Carmona

http://www.prstatistics.com/course/functional-ecology-from-organism-to-ecosystem-theory-and-computation-feer01/

8.  December 3rd – 7th 2018
INTRODUCTION TO BAYESIAN DATA ANALYSIS FOR SOCIAL AND BEHAVIOURAL 
SCIENCES USING R AND STAN (BDRS01)

Glasgow, Dr. Mark Andrews
https://www.psstatistics.com/course/introduction-to-bayesian-data-analysis-for-social-and-behavioural-sciences-using-r-and-stan-bdrs01/

9.  January 21st – 25th 2019
STATISTICAL MODELLING OF TIME-TO-EVENT DATA USING SURVIVAL ANALYSIS: AN 
INTRODUCTION FOR ANIMAL BEHAVIOURISTS, ECOLOGISTS AND EVOLUTIONARY 
BIOLOGISTS (TTED01)

Glasgow, Scotland, Dr. Will 

Re: [R-sig-eco] 2-way adonis (PERMANOVA) incl interaction - how to test for main effects?

2018-10-16 Thread Ellen Pape
Hi,

I know that A*B = A+B+A:B, but in this case, i.e. doing an adonis2 and
specifying by="terms" will only do the test for the interaction, not the
main effects. If one chooses by="terms", you will get a test for the main
effects and the interaction, but than the order of factors matters.

Best regards
Ellen

On Tue, 16 Oct 2018 at 12:23, Torsten Hauffe 
wrote:

> "adonis2(speciesdataset~A*B, by="margin") but then only the effect of the
> interaction is tested."
>
> This is not entirely correct.
> adonis2(speciesdataset~A:B, by="margin") would test the interaction
> alone.  ~A*B unfolds to ~A+B+A:B
>
> On Tue, 16 Oct 2018 at 11:51, Ellen Pape  wrote:
>
>> Hi all,
>>
>> I don't know whether this is the correct mailing group to address this
>> question:
>>
>> I would like to perform a 2-way permanova analysis in R (using adonis in
>> vegan). By default you are performing sequential tests (by="terms"), so
>> when you have 2 or more factors, the order of these factors matter.
>> However, since I wanted to circumvent this, I chose for the option
>> by="margin" (adonis2(speciesdataset~A*B, by="margin")) but then only the
>> effect of the interaction is tested. On the "help page" of anova. cca it
>> says: "if you select by="margin" -> the current function only evaluates
>> marginal terms. It will, for instance, ignore main effects that are
>> included in interaction terms."
>>
>>
>> My question now is: can I somehow get the main effects tested anyhow, when
>> the interaction term is not significant?
>>
>> Thanks,
>> Ellen
>>
>> [[alternative HTML version deleted]]
>>
>> ___
>> R-sig-ecology mailing list
>> R-sig-ecology@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>>
>

[[alternative HTML version deleted]]

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


Re: [R-sig-eco] 2-way adonis (PERMANOVA) incl interaction - how to test for main effects?

2018-10-16 Thread Marcelino De La Cruz Rot
El 16/10/2018 a las 12:09, Ellen Pape escribió:
> Hi,
>
> Yes, but is there no way of testing for the main effects and 
> interaction simultaneously?

In general, this is "not allowed", to say it with your words.

>
> I also thought of first testing the interaction: 
> adonis2(speciesdataset~ A *** B, by="margin") , and then - if the 
> interaction is not significant- testing for the main effects by 
> adonis2(speciesdataset~ A *+* B, by="margin") . Is this "allowed"?

This is analogous to, e.g., an ANCOVA, isn't it? Therefore it makes 
quite sense.


>
> Thanks,
> Ellen
>
> On Tue, 16 Oct 2018 at 12:01, Marcelino De La Cruz Rot 
> mailto:marcelino.delac...@urjc.es>> wrote:
>
> El 16/10/2018 a las 11:51, Ellen Pape escribió:
> > Hi all,
> >
> Maybe adonis2(speciesdataset~ A + B, by="margin") ?
>
>
>
> > I don't know whether this is the correct mailing group to
> address this
> > question:
> >
> > I would like to perform a 2-way permanova analysis in R (using
> adonis in
> > vegan). By default you are performing sequential tests
> (by="terms"), so
> > when you have 2 or more factors, the order of these factors matter.
> > However, since I wanted to circumvent this, I chose for the option
> > by="margin" (adonis2(speciesdataset~A*B, by="margin")) but then
> only the
> > effect of the interaction is tested. On the "help page" of
> anova. cca it
> > says: "if you select by="margin" -> the current function only
> evaluates
> > marginal terms. It will, for instance, ignore main effects that are
> > included in interaction terms."
> >
> >
> > My question now is: can I somehow get the main effects tested
> anyhow, when
> > the interaction term is not significant?
> >
> > Thanks,
> > Ellen
> >
> >       [[alternative HTML version deleted]]
> >
> > ___
> > R-sig-ecology mailing list
> > R-sig-ecology@r-project.org 
> > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> > .
> >
>
> -- 
> Marcelino de la Cruz Rot
> Depto. de Biología y Geología
> Física y Química Inorgánica
> Universidad Rey Juan Carlos
> Móstoles España
>

-- 
Marcelino de la Cruz Rot
Depto. de Biología y Geología
Física y Química Inorgánica
Universidad Rey Juan Carlos
Móstoles España

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


Re: [R-sig-eco] 2-way adonis (PERMANOVA) incl interaction - how to test for main effects?

2018-10-16 Thread Torsten Hauffe
 "adonis2(speciesdataset~A*B, by="margin") but then only the effect of the
interaction is tested."

This is not entirely correct.
adonis2(speciesdataset~A:B, by="margin") would test the interaction alone.
~A*B unfolds to ~A+B+A:B

On Tue, 16 Oct 2018 at 11:51, Ellen Pape  wrote:

> Hi all,
>
> I don't know whether this is the correct mailing group to address this
> question:
>
> I would like to perform a 2-way permanova analysis in R (using adonis in
> vegan). By default you are performing sequential tests (by="terms"), so
> when you have 2 or more factors, the order of these factors matter.
> However, since I wanted to circumvent this, I chose for the option
> by="margin" (adonis2(speciesdataset~A*B, by="margin")) but then only the
> effect of the interaction is tested. On the "help page" of anova. cca it
> says: "if you select by="margin" -> the current function only evaluates
> marginal terms. It will, for instance, ignore main effects that are
> included in interaction terms."
>
>
> My question now is: can I somehow get the main effects tested anyhow, when
> the interaction term is not significant?
>
> Thanks,
> Ellen
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

[[alternative HTML version deleted]]

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


Re: [R-sig-eco] 2-way adonis (PERMANOVA) incl interaction - how to test for main effects?

2018-10-16 Thread Ellen Pape
Hi,

Yes, but is there no way of testing for the main effects and interaction
simultaneously?

I also thought of first testing the interaction: adonis2(speciesdataset~ A
*** B, by="margin") , and then - if the interaction is not significant-
testing for the main effects by adonis2(speciesdataset~ A *+* B,
by="margin") . Is this "allowed"?

Thanks,
Ellen

On Tue, 16 Oct 2018 at 12:01, Marcelino De La Cruz Rot <
marcelino.delac...@urjc.es> wrote:

> El 16/10/2018 a las 11:51, Ellen Pape escribió:
> > Hi all,
> >
> Maybe adonis2(speciesdataset~ A + B, by="margin") ?
>
>
>
> > I don't know whether this is the correct mailing group to address this
> > question:
> >
> > I would like to perform a 2-way permanova analysis in R (using adonis in
> > vegan). By default you are performing sequential tests (by="terms"), so
> > when you have 2 or more factors, the order of these factors matter.
> > However, since I wanted to circumvent this, I chose for the option
> > by="margin" (adonis2(speciesdataset~A*B, by="margin")) but then only the
> > effect of the interaction is tested. On the "help page" of anova. cca it
> > says: "if you select by="margin" -> the current function only evaluates
> > marginal terms. It will, for instance, ignore main effects that are
> > included in interaction terms."
> >
> >
> > My question now is: can I somehow get the main effects tested anyhow,
> when
> > the interaction term is not significant?
> >
> > Thanks,
> > Ellen
> >
> >   [[alternative HTML version deleted]]
> >
> > ___
> > R-sig-ecology mailing list
> > R-sig-ecology@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> > .
> >
>
> --
> Marcelino de la Cruz Rot
> Depto. de Biología y Geología
> Física y Química Inorgánica
> Universidad Rey Juan Carlos
> Móstoles España
>
>

[[alternative HTML version deleted]]

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


Re: [R-sig-eco] 2-way adonis (PERMANOVA) incl interaction - how to test for main effects?

2018-10-16 Thread Marcelino De La Cruz Rot
El 16/10/2018 a las 11:51, Ellen Pape escribió:
> Hi all,
>
Maybe adonis2(speciesdataset~ A + B, by="margin") ?



> I don't know whether this is the correct mailing group to address this
> question:
>
> I would like to perform a 2-way permanova analysis in R (using adonis in
> vegan). By default you are performing sequential tests (by="terms"), so
> when you have 2 or more factors, the order of these factors matter.
> However, since I wanted to circumvent this, I chose for the option
> by="margin" (adonis2(speciesdataset~A*B, by="margin")) but then only the
> effect of the interaction is tested. On the "help page" of anova. cca it
> says: "if you select by="margin" -> the current function only evaluates
> marginal terms. It will, for instance, ignore main effects that are
> included in interaction terms."
>
>
> My question now is: can I somehow get the main effects tested anyhow, when
> the interaction term is not significant?
>
> Thanks,
> Ellen
>
>   [[alternative HTML version deleted]]
>
> ___
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> .
>

-- 
Marcelino de la Cruz Rot
Depto. de Biología y Geología
Física y Química Inorgánica
Universidad Rey Juan Carlos
Móstoles España

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


[R-sig-eco] 2-way adonis (PERMANOVA) incl interaction - how to test for main effects?

2018-10-16 Thread Ellen Pape
Hi all,

I don't know whether this is the correct mailing group to address this
question:

I would like to perform a 2-way permanova analysis in R (using adonis in
vegan). By default you are performing sequential tests (by="terms"), so
when you have 2 or more factors, the order of these factors matter.
However, since I wanted to circumvent this, I chose for the option
by="margin" (adonis2(speciesdataset~A*B, by="margin")) but then only the
effect of the interaction is tested. On the "help page" of anova. cca it
says: "if you select by="margin" -> the current function only evaluates
marginal terms. It will, for instance, ignore main effects that are
included in interaction terms."


My question now is: can I somehow get the main effects tested anyhow, when
the interaction term is not significant?

Thanks,
Ellen

[[alternative HTML version deleted]]

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