Re: [R] interaction contrasts

2010-10-18 Thread Kay Cecil Cichini
hello, yes, thanks a lot - i noticed relevel() beeing very convinient for this purpose. having an authority at hand may i kindly ask, if you could reinsure me that the contrasts below are set up correctly, supposing i want to test the earlier mentioned hypotheses simultanously. thanks, kay

Re: [R] interaction contrasts

2010-10-15 Thread David Winsemius
Should you need to do it again, you may want to look at the relevel function. I suppose that would meet the definition of some versions of "on the fly" but once I have a model, rerunning with a different factor leveling is generally pretty painless. -- David. On Oct 15, 2010, at 9:09 AM,

Re: [R] interaction contrasts

2010-10-15 Thread Kay Cichini
..by some (extensive) trial and error reordering the contrast matrix and the reference level i figured it out myself - for anyone who might find this helpful searching for a similar contrast in the future: this should be the right one: c2<-rbind("fac2-effect in A"=c(0,1,0,0,0,0,0,0),

Re: [R] interaction contrasts

2010-10-15 Thread Kay Cichini
hello, i was shortly asking the list for help with some interaction contrasts (see below) for which i had to change the reference level of the model "on the fly" (i read a post that this is possible in multcomp). if someone has a clue how this is coded in multcomp; glht() - please point me ther

[R] interaction contrasts

2010-10-13 Thread Kay Cichini
hello list, i'd very much appreciate help with setting up the contrast for a 2-factorial crossed design. here is a toy example: library(multcomp) dat<-data.frame(fac1=gl(4,8,labels=LETTERS[1:4]), fac2=rep(c("I","II"),16),y=rnorm(32,1,1)) mod<-lm(y~fac1*fac2,data=dat) ## the

Re: [R] Interaction contrasts or posthoc test for glm (MASS) with ANOVA design

2009-11-02 Thread David Winsemius
On Nov 2, 2009, at 8:40 AM, Maya Pfaff wrote: Dear R experts I am running a negative-binomial GLM (glm.nb) to test the null hypotheses that species 1 and 2 are equally abundant between site 1 and site2, and between each other. So, I have a 2x2 factorial design with factors Site (1,2) an

[R] Interaction contrasts or posthoc test for glm (MASS) with ANOVA design

2009-11-02 Thread Maya Pfaff
Dear R experts I am running a negative-binomial GLM (glm.nb) to test the null hypotheses that species 1 and 2 are equally abundant between site 1 and site2, and between each other. So, I have a 2x2 factorial design with factors Site (1,2) and Taxon (1,2). Since the Site:Taxon interaction is signif