Re: [R] help with contrasts.

From: John Fox <jfox_at_mcmaster.ca>
Date: Mon 26 Jun 2006 - 03:19:27 EST


Dear Rodrigo,

One way to do what you want is by

contrasts(f) <- matrix(
  c(1, 1, -1, -1, 1, -1, 0, 0, 0, 0, 1, -1),   ncol=3)

See ?contrasts for details.

I hope this helps,
 John

On Sun, 25 Jun 2006 11:48:57 -0300
 Rodrigo Gazaffi <rgazaffi@carpa.ciagri.usp.br> wrote:
> Hello list,
>
> I would like to know how can I use contrats in statistical analysis.
> I
> have a simple model, "one-way analysis of variance" "or two-way..."
> (balanced case).
>
> I've already used the command aov (model) to get the analysis of
> variance, but i know that my treatment could be organized in groups,
> so i would like to test these groups.
>
> Example: I have 4 treatments t1, t2, t3, t4 and i would like to test
> (1, 1, -1, -1) and (1, -1, 0, 0) and (0, 0, 1, -1).
>
> thanks for the attention.
>
> Rodrigo Gazaffi
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html



John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jun 26 03:26:54 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 26 Jun 2006 - 06:11:48 EST.

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