[R-sig-ME] afex "mixed" function - issue with Helmert coded contrasts
lrk4 at uw.edu
Mon Sep 11 21:20:33 CEST 2017
I am running afex "mixed" function to get p values from a lmer model with a
continuous predictor (reaction times between 200ms-999ms), five fixed
variables, and a random subject intercept.
One of my variables is Helmert coded contrast, and when I run the model
using the "mixed" function it will change that contrast to "contr.sum" and
I will not receive p values for the contrasted levels.
It successfully runs the model and gives p values for all coefficients,
except for the contrasts. If "check.contrasts" option is TRUE - it sets the
contrasts to "contr.sum" and I don't get p values for the contrasted levels
and their interactions. If "check.contrasts" = FALSE runs fine but
obviously the contrasts aren't checked.
Here are the lines of code that I am using to run the model:
full_form_RT <- formula(raw_RT ~
RT_full_mod <- mixed(full_form_RT, data=foo, method="S")
When I use method = "KR" I get the following error so I have used method =
'anova from lme4 is returned
some computational error has occurred in lmerTest
Error in '[.data.frame'(anova_table, ,c("NumDF", "DenDF", "F.value", :
undefined columns selected'
Does anyone know how I might be able to obtain p values for the contrasts?
Is there a reason that they are automatically changed to "contr.sum" and I
can't use the Helmert coding? Or why the Kenward-Roger method gives me the
Thank you for your time,
Laboratory for Auditory Brain Sciences & Neuroengineering
Department of Speech and Hearing Sciences
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models