Re: [R] contrasts using adonis function

From: Gavin Simpson <gavin.simpson_at_ucl.ac.uk>
Date: Mon, 16 Jun 2008 14:32:00 +0100

On Mon, 2008-06-16 at 14:38 +0200, Luis San José García wrote:
> Hi,
>
> Somebody knows how to make contrasts if i'm using the function adonis?

What is wrong with the defaults? From ?adonis:

Usage:

     adonis(formula, data, permutations = 5, method = "bray",
            strata = NULL, contr.unordered = "contr.sum",
            contr.ordered = "contr.poly", ...)

So look at ?contr.sum and ?contr.poly for what constrasts adonis uses by default. If you want something different, then supply "contr.helmert" or "contr.treatment", "contr.sum", or "contr.poly" to the relevant argument in your adonis call.

If you want your own "special" contrasts, then I presume they make sense in the context of the analysis? But for that you'll need to write your own function to calculate the constrasts you want, along the lines of contr.sum() or one of the other contrast functions.

HTH G

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

______________________________________________
R-help_at_r-project.org mailing list
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.
Received on Mon 16 Jun 2008 - 13:52:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 16 Jun 2008 - 14:30:51 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive