Skip to content

ANOVA type lll ss table for GLMER?

4 messages · Heather Moylett, Ben Bolker, Henrik Singmann

#
Dear Heather,

you could try to use mixed from the afex package which will give you Type III p-values for the effects via Chi^2 tests (or alternatively via parametric bootstrap):

require(afex)
(spden2 <- mixed(SpDens~(treat*samp)-1+(1|TRANSECT),family=poisson, data=rm, nAGQ = 9, method = "LRT")

Note however, that loading afex changes your overall contrasts, to reset the default contrasts use:
options(contrasts=c('contr.treatment', 'contr.poly'))

Furthermore, (g)lmer doesn't break the factors done by *all* levels. It removes the first levels (usually). Hence the parameters cannot directly be interpreted if this level is "significant".

Hope this helps,
Henrik

Am 14.05.2014 15:45, schrieb Heather Moylett:

  
    
#
On 14-05-14 10:02 AM, Henrik Singmann wrote:
But (despite the fact that I **really** don't like afex's default
behaviour of changing the overall contrasts) -- you should definitely
use contr.sum when computing a marginal ANOVA table (i.e. do NOT reset
the contrasts until after you're done constructing your table), if you
insist on doing that.
#
Am 14.05.2014 21:47, schrieb Ben Bolker:
First, all afex functions (including mixed) are unaffected by global contrasts as long as the argument check.contrasts = TRUE (which is the default). In other words, mixed per default uses contr.sum independently of the global contrasts (more specifically, it sets it for all factors if not already contr.sum or if the global contrasts are not contr.sum).

Second, I give in. From the current development version on (version 0.10-110) afex *does not* change the global contrasts anymore. This should not affect any of the functions within afex (my tests confirm that). To make setting contrasts globally easy, I added the following convenience functions: set_sum_contrasts(), set_default_contrasts(), set_treatment_contrasts(), ...

Are you happy now, Ben? :)

You can install the the development version of afex from R-forge (may take a few hours):  install.packages("afex", repos="http://R-Forge.R-project.org")