[R-sig-ME] afex "mixed" function - issue with Helmert coded contrasts

Lindsey Kishline lrk4 at uw.edu
Mon Sep 11 21:20:33 CEST 2017


Hello all,

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 ~
two_flashes*cue_attn*ecc*two_sounds_at_target_location*pressed_two +
(1|subjnum))
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 =
"S":
'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
above error?

Thank you for your time,

-- 
Lindsey Kishline
Graduate Student
Laboratory for Auditory Brain Sciences & Neuroengineering
ILABS
Department of Speech and Hearing Sciences
Tel: 206-616-0102

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list