[R] [FORGED] Re: Dunnett Test in 'multicomp' package

Rolf Turner r.turner at auckland.ac.nz
Fri Jun 5 09:48:03 CEST 2015


On 05/06/15 11:08, Jim Lemon wrote:
> Hi James,
> You can change the order of levels like this:
>
> levels(viagraData$dose)<-c("placebo","low dose","high dose")

<SNIP>

As Richard Heiberger has pointed out, this is wrong.

What *does* work is:

viagraData$dose)<-factor(viagraData$dose,
                         levels=c("placebo","low dose","high dose")

This is a trap into which many a Young Player (including my very good 
self) has fallen.

cheers,

Rolf Turner



-- 
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276



More information about the R-help mailing list