[R] Tukey tests in two-way ANOVA

peter dalgaard pdalgd at gmail.com
Tue May 16 01:02:05 CEST 2017


I think you forgot to turn site and year into factors. (The 1 Df is the giveaway).

-pd

> On 15 May 2017, at 19:40 , 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.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list