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

James Henson jfhenson1 at gmail.com
Fri Jun 5 16:12:20 CEST 2015


Thanks. A useful tip for a long-time SAS user.
James F. Henson

On Fri, Jun 5, 2015 at 3:47 AM, Gerrit Eichner <
Gerrit.Eichner at math.uni-giessen.de> wrote:

> Hello, everyone,
>
> aside from Rolf's hint (and Richard's warning!) you could also consider
> relevel():
>
> viagraData$dose <- relevel( viagraData$dose, ref = "placebo")
>
>  Hth  --  Gerrit
>
>
> On Fri, 5 Jun 2015, Rolf Turner wrote:
>
>  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
>>
>> ______________________________________________
>> 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.
>>
>
> ______________________________________________
> 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.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list