[R] Tukey tests in two-way ANOVA

Richard M. Heiberger rmh at temple.edu
Tue May 16 01:02:28 CEST 2017


you have only one df for site and one df for year.  most likely you
skipped the step of
telling R those are factors.

On Mon, May 15, 2017 at 1:40 PM, Lucy McMahon
<lucymcmahon004 at hotmail.co.uk> wrote:
> R-help:
>
> I'm looking into the abundance of an algal species over site and years using a two-way ANOVA:
>
>> summary (aov (fserratus ~ site+year))
>             Df     Sum Sq   Mean Sq   F value      Pr(>F)
> site       1      1487       1486.6      6.094       0.0155 *
> year      1      1173      1172.8      4.808       0.0309 *
>
> But I'm receiving the following warning messages when I run the Tukey test.
>> TukeyHSD(aov(fserratus ~ site+year))
>
> $site
>                     diff              lwr                      upr                 p adj
> 1-0         -8.039565     -14.51045     -1.568685    0.0154723
>
> Warning messages:
> 1: In replications(paste("~", xx), data = mf) : non-factors ignored: year
> 2: In TukeyHSD.aov(aov(fserratus ~ site + year)) :
>   'which' specified some non-factors which will be dropped
>
>
> Any advice would be appreciated, thanks.
>
>
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list