Skip to content

contrasts in glmer

1 message · Ben Bolker

#
On 11-12-19 08:49 AM, Magal? Matteodo wrote:
This question would be more appropriate for
r-sig-mixed-models at r-project.org, or r-sig-ecology at r-project.org, or
even r-help at r-project.org .  Your question is not glmer-specific; I
found the answer by following the clues in the documentation, which lead
to ?lm and
thence to ?model.matrix.default:

contrasts.arg: A list, whose entries are values (numeric matrices or
          character strings naming functions) to be used as replacement
          values for the ?contrasts? replacement function and whose
          names are the names of columns of ?data? containing
          ?factor?s.

  Thus, you would need

contrasts=list(Pollen_vector=contr.sum))

Alternatively, see ?options and search for "contrast"