[R] contrasts using adonis function

2008-06-16 Thread Luis San José García

Hi,

Somebody knows how to make contrasts if i'm using the function adonis?

Thanks.

__
R-help@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.


Re: [R] contrasts using adonis function

2008-06-16 Thread Gavin Simpson
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@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.