[R] glm pairwise interaction coefficients
josh at roofchop.com
Thu Oct 8 22:57:22 CEST 2009
I am trying to recreate the analysis of the recent Kirwan et al paper in
Ecology [9(80), 2032-2032]. The SAS code is available but am having
troubles getting the R equivalents.
The SAS code is:
*Model 5 - Species-specific interaction coefficients;
PROC GLM; where N=150;
MODEL YIELD=G1 G2 L1 L2 G1INT G2INT L1INT L2INT M / NOINT SOLUTION;
*calculate the pairwise interaction coefficients;
estimate 'g1*g2' g1int 1 g2int 1;
estimate 'g1*l1' g1int 1 l1int 1;
estimate 'g1*l2' g1int 1 l2int 1;
estimate 'g2*l1' g2int 1 l1int 1;
estimate 'g2*l2' g2int 1 l2int 1;
estimate 'l1*l2' l1int 1 l2int 1;
I can recreate the model, but can't wrap my head around computing the
pairwise interaction coefficients. They also refer to it as linear
contrasts in the text. The estimate of the interaction is just the sum of
the estimates of the terms in the model, but I would like to also compute a
P value for each one.
mod2<-glm(YIELD~G1+G2+L1+L2+M-1, data=subset(foo, N==150))
the terms are:
I have search and mostly come up with talk on contrasts among levels of
categorical variables. Any help would be much appreciated.
View this message in context: http://www.nabble.com/glm-pairwise-interaction-coefficients-tp25811201p25811201.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help