[R-sig-ME] Contrast in lme4

Ben Bolker bbolker at gmail.com
Thu Mar 12 19:55:06 CET 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

  "How do I set up custom contrasts?" is (1) not specific to mixed
models (so not really appropriate for this list -- maybe try r-help or
Stack Overflow); (2) rather tricky in R (it may be difficult in all
statistics packages/languages, I don't know); and (3) sufficiently
detailed that the information you give below isn't really quite
sufficient.  A reproducible example will help when you post your
question somewhere else.  You can use the "contrast" package, or the
"multicomp" package, to test contrasts.  As far as how the contrasts
are set up, there's a reasonable description in Crawley's _Data
Analysis in S-PLUS_ book, or see

http://www.ats.ucla.edu/stat/r/library/contrast_coding.htm
http://ms.mcmaster.ca/~bolker/classes/s4c03/notes/week2B.pdf


On 15-03-12 01:52 PM, Douglas Bates wrote:
> It is better to send questions like this to the 
> R-SIG-Mixed-Models at R-project.org mailing list, which I am cc:ing on
> this reply.
> 
> On Thu, Mar 12, 2015 at 3:09 AM adeela uaf <adeela.uaf at gmail.com>
> wrote:
> 
>> Dear Douglas Bates, How to perform contrast analysis for fixed
>> effects in lme4 package. My data is same as sleepstudy data with
>> an additional cloumn comprising  12 treatments also. The
>> structure of the treatmnets is such that: 1) 1 treatment is
>> control 2) 4 treatments are bio-agents. 3) 3 treatments are
>> botanical. 4) 2 are bi prodcts 5) 2 are fungisides I want to make
>> comparison among the groups which differ significantly after 
>> Model<-lmer(Disease~Trt+Date+Trt*Date+(1|Subject),data=YR) Best
>> Regars, Adeela
>> 
> 
> [[alternative HTML version deleted]]
> 
> _______________________________________________ 
> R-sig-mixed-models at r-project.org mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJVAeEKAAoJEOCV5YRblxUHVKoH+QHgr4Z9sH8TlZsawhbZCn6B
+k5VyPyffaY0SavglCGl1zC9Q4aBipTp8+cGiwKyf6HxXsj6X65Q1NCYDptKArr5
35bHEJ49ITAEX4ur8qw0KRVZCE5BwsCgB1rAW3Pg/ltMz2bG1VpAe1TsOQy+NNkz
ZNfm8OaJurjy1ScAj9HCDvbLVhFyuD72tACI8hrWwVBrACRKdad4xDtc0BQyhm+Q
sadLClqK7/diTX9KHmS4LhMibHfVgRzWgTN7MesKj8y6d3uX/dX2WQtmViXY2RXP
C8jzeF/evoofgAxPE6ivGTWku0frG+1qAicNNcYznGi+SuLmH0cvyW1asy9TSgc=
=TVUv
-----END PGP SIGNATURE-----



More information about the R-sig-mixed-models mailing list