[R] TukeyHSD doubts
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Sep 28 09:06:18 CEST 2007
This is a repost of
https://stat.ethz.ch/pipermail/r-help/2007-September/141727.html
Please do study the posting guide to see why you did not get an answer and
what to do when you do not.
It is nothing to do with TukeyHSD, as the differences are there in the
means.
It is clear that your covariates are havng an effect on the fit.
Presumably you suspected that because you tried a fit with them included,
and the fit with covariates is therefore the one to use.
As the posting guide points out this is not a list for statistical advice,
so please make use of your local statistical advice service for help on
the substantive issues here.
On Thu, 27 Sep 2007, Mariana Botelho wrote:
> Hello,
>
> I have some doubts on TukeyHSD application.
>
> I want to investigate the effects of depth, latitude and month variation on
> the length of a fish. These are orthogonal and observational data.
>
> For this, I have made an aov model (L~month+lat+prof+month*lat), after
> applying drop1 and step functions. But when I applied TukeyHSD I had
> unexpected results.
>
> For instance, I have three levels for latitude and the mean and standard
> deviation of lengths are:
>
>> aggregate(LtMm,list(FLat=FLat),mean)
>
> FLat x
>
> 1 24.5 431.8745
>
> 2 25 415.9973
>
> 3 25.5 416.0420
>
>
>
>> aggregate(LtMm,list(FLat=FLat),sd)
>
> FLat x
>
> 1 24.5 114.6516
>
> 2 25 108.9774
>
> 3 25.5 105.5219
>
>
>
> So, it's expected to have 25 and 25.5 levels closer than 24.5, and we see
> this making a simple aov model:
>
>> aov.LtArL <-aov(LtMm~FLat)
>
>> TukeyHSD(aov.LtArL, ordered = TRUE)
>
> Tukey multiple comparisons of means
>
> 95% family-wise confidence level
>
> factor levels have been ordered
>
>
>
> Fit: aov(formula = LtMm ~ FLat)
>
>
>
> $FLat
>
> diff lwr upr p adj
>
> 25.5-25 0.04474535 -16.009079 16.09857 0.9999764
>
> 24.5-25 15.87715429 -5.371913 37.12622 0.1860347
>
> 24.5-25.5 15.83240894 -3.213078 34.87790 0.1251572
>
>
>
> Nevertheless, the complete model indicates just the opposite:
>
>> aov.LtAr<-aov(LtMm~FMes+FLat+FProf+FMes*FLat)
>
>> TukeyHSD(aov.LtAr,"FLat",ordered=T)
>
> Tukey multiple comparisons of means
>
> 95% family-wise confidence level
>
> factor levels have been ordered
>
>
>
> Fit: aov(formula = LtMm ~ FMes + FLat + FProf + FMes * FLat)
>
>
>
> $FLat
>
> diff lwr upr p adj
>
> 24.5-25.5 6.46322 -11.706623 24.63306 0.6815646
>
> 25-25.5 19.72066 4.404934 35.03639 0.0072350
>
> 25-24.5 13.25744 -7.014670 33.52955 0.2751153
>
> Which should be the right interpretation?
>
> Thanks in advance for any help!
>
> Best regards,
>
> Mariana L. L. A. Botelho
>
> MSc candidate
>
> São Paulo Fisheries Institute
>
> Brazil
>
> [[alternative HTML version deleted]]
>
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list