[R] Compare one level of a factor with *all* other non-missing levels

Peter Ehlers ehlers at ucalgary.ca
Fri Dec 10 14:06:39 CET 2010


On 2010-12-10 03:24, deriK2000 wrote:
>
> Dear list,
>
> I try to compare the mean of a variable given a value of a factor with the
> mean of the same variable for all K-1 other non-missing values of this
> factor. This procedure I want to repeat for each level of the factor.
>
> Having read the recommendations of this list I want to avoid creating K-1
> dummy variables and searched for options of the pairwise.t.test. But
> couldn't find a solution. Anyone with a suggestion how to do the
> comparisions?

Sounds like you want the Dunnett test procedure which seems
to be implemented in a number of packages: multcomp, asd, MCPAN
and others.

It would probably be a good idea to install package 'sos' and
learn how to search with it.

Peter Ehlers

>
> Cheers,
>
> Derik



More information about the R-help mailing list