knitr::opts_chunk$set(echo = TRUE)
contr.SAS
in lmerTestWhen computing type III ANOVA tables, lmerTest refits the model using contr.SAS
, i.e., SAS-type contrasts for all factors. This has the following consequences:
Draw backs:
contr.poly
to contr.SAS
. What is the meaning of type III tests for ordered factors? How does SAS handle these?Advantages:
contr.treatment
but also contr.sum
, contr.helmert
and contr.poly
which generates orthogonal polynomials for ordered factors.contr.treatment
or contr.SAS
are used usually does not matter - only the interpretation of coefficients (which are never seen anyway) changes.L
-matrix (containing the general contrast structure) has a particular and known structure. Notes:
contr.SAS
, that the code also works when contr.treatment
is used. This means that when the default contr.treatment
have been used, there should be no reason to refit the models with contr.SAS
. lmerTestR takes a different approach since it doesn't refit the models and so throws an error if contr.treatment
or contr.SAS
has not been used. Essentially this requires the user to refit the models with one of these contrasts. This will probably rarely be the case, but can come into play if contr.sum
has been set for some odd reason, or if ordered factors are used in which case contr.poly
will be used by default.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.