Skip to content
Prev 14071 / 20628 Next

Orthogonal Polynomial contrasts with ordered factors

Hello,

I would appreciate to get to know more about the use of polynomial 
contrasts in lme4::glmer.
Does anybody could give me an advice for literature about that subject.

In particular
A:  I read, that if a second order polynomial is significant in the 
summary output, then it is supposed to be significant AFTER the first 
order polynomial was                 taken into account. Is that right?

B1 : What happens if i use an ordered factor with another factor 
(ordered or not) in an itneraction term? What does a signficant 
interaction of the second                factor (any level) with the 
fourth power polynomial of the first ordered factor tell me?
B2: And waht does it tell me when the lower order polynomials are not 
significant in the interaction?


For more interested readers:

_The data_
My data is abundances of earthworms. I sampled 15 fields, three times 
(samcam) during two years, with 4 pseudoreplicates per field (N=180).
The factor age_class describes the stage of development of the field, it 
has 5 levels ((n = 3 replicates).
However, one of these levels A_Cm has n=6 since i had to switch the 
fields in the second year.
Field.ID is my random factor, to control for the pseudoreplication per 
field and the longitudinal character of the data.  For the sake of less 
complexity samcam stayed non-ordered.

Here is the design

  field.ID\samcam1 2 3 1 4 4 4 2 4 4 4 3 4 4 4 4 4 4 4 5 4 4 4 6 4 4 4 7 4 
4 4 8 4 4 4 9 4 4 4 10 4 4 4 11 4 4 4 _12 4 4 4_ 13 4 0 0 Fields had to 
be switched in the second year 14 4 0 0 15 4 0 0 16 0 4 4 17 0 4 4 18 0 4 4



Other continuous predictor variables were scaled before analysis.

data structure:
  $ abundance      : num  0 0 3 3 2 1 2 5 12 5 ...

  $ ID             : Factor w/ 180 levels "1","2","3","4",..: 1 2 3 4 5 
6 7 8 9 10 ...
  $ field.ID       : Factor w/ 18 levels "1","2","3","4",..: 1 1 1 1 2 2 
2 2 3 3 ...
  $ age_class      : Ord.factor w/ 5 levels "A_Cm"<"B_Sp_young"<..: 5 5 
5 5 5 5 5 5 5 5 ...
  $ samcam         : Factor w/ 3 levels "1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
  $ hole           : Factor w/ 4 levels "1","2","3","4": 1 2 3 4 1 2 3 4 
1 2 ...

  $ scl.pH         : num  -1.553 -1.553 -1.553 -1.553 0.715 ...
  $ scl.mc         : num  -1.072 -1.072 -1.072 -1.072 -0.429 ...
  $ scl.cn         : num  -0.703 -0.703 -0.703 -0.703 -0.474 ...
  $ scl.sand       : num  -0.245 -0.245 -0.245 -0.245 -0.0127 ...
  $ scl.silt       : num  -0.897 -0.897 -0.897 -0.897 -1.529 ...
  $ scl.clay       : num  1.19 1.19 1.19 1.19 1.66 ...
  $ scl.ata1       : num  1.6471 1.6471 1.6471 1.6471 0.0894 ...
  $ scl.atb1       : num  1.6658 1.6658 1.6658 1.6658 0.0659 ...
  $ scl.hum1       : num  -1.378 -1.378 -1.378 -1.378 0.429 ...

_my hyptheses are_
1. abundance increases with increasing age_class
2. If abundance increases over the age classes it will be observed by 
increasing abundance during the period of sampling
(3. Abundance increases during the period of sampling)

_The Model was :_
best.mod <- glmer(abundance~ age_class*samcam + scl.prec1 + 
scl.mc*scl.pH  + (1|field.ID)  ,data=data,family=poisson, 
control=glmerControl(optimizer="bobyqa"))

here is The Model output of one of the best models revealed by 
MuMIn::dredge:

Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
  Family: poisson  ( log )
Formula: anc ~ age_class * samcam + I(scl.ats1^2) + scl.prec1 + (1 | field.ID)
    Data: data
Control: glmerControl(optimizer = "bobyqa")

      AIC      BIC   logLik deviance df.resid
      731      789     -348      695      162

Scaled residuals:
    Min     1Q Median     3Q    Max
-2.181 -0.696 -0.171  0.644  4.178

Random effects:
  Groups   Name        Variance Std.Dev.
  field.ID (Intercept) 0.263    0.513
Number of obs: 180, groups:  field.ID, 18

Fixed effects:
                     Estimate Std. Error z value Pr(>|z|)
(Intercept)           0.6457     0.2079    3.11   0.0019 **
age_class.L           1.9924     0.4416    4.51  6.4e-06 ***
age_class.Q          -0.8644     0.4204   -2.06   0.0398 *
age_class.C          -0.2373     0.4007   -0.59   0.5537
age_class^4           0.7026     0.3591    1.96   0.0504 .
samcam2               0.8549     0.2074    4.12  3.7e-05 ***
samcam3               0.3074     0.1852    1.66   0.0969 .
I(scl.ats1^2)        -0.3328     0.1038   -3.21   0.0013 **
scl.prec1             0.2241     0.0851    2.63   0.0085 **
age_class.L:samcam2  -0.3474     0.5463   -0.64   0.5248
age_class.Q:samcam2   0.1074     0.4766    0.23   0.8216
age_class.C:samcam2   0.8910     0.3644    2.44   0.0145 *
_age_class^4:samcam2 -1.0352 0.2601 -3.98 6.9e-05 *** _   # HERE is the significant interaction of interest!
age_class.L:samcam3   0.1274     0.5125    0.25   0.8038
age_class.Q:samcam3  -0.1801     0.4429   -0.41   0.6842
age_class.C:samcam3   0.5659     0.3615    1.57   0.1174
_age_class^4:samcam3 -0.6489 0.2617 -2.48 0.0131 * ___# HERE is the significant interaction of interest!


_Interpretation:_
I understood, that the relationship was linear in general, as indicated 
by the second line of the output, and this did not change between the 
sampling campaigns. However, during the second and third sampling 
campaign the relationship of abundances in the age_classes was 
characterised by a stronger slope in younger classes and reached a 
plateau afterwards, as indicated by the fourth power.
The missing of the interaction between age_class and samcam1 is very 
hard for me to understand

I'm thankful for any advices!

Quentin