[R-lang] Re: p-values for mixed effects models with random slopes

Jonathan Baron baron@psych.upenn.edu
Tue Jan 18 03:51:44 PST 2011


The lme4a package has a bootMer function, which may be what you want
to do.  (I cannot figure out what it does, from the documentation.)

On the original question of pvals.fnc() with random slopes, the last
time I checked, the problem was that it could not handle correlated
random effects.  Thus
l1 <- lmer(y ~ x + (1+x|subject))
would not work, but
l2 <- lmer(y ~ x + (1|subject) + (0+x|subject))
would work in pvals.fnc().  l2 assumes no correlation between the
slope and intercept (I think).

The output of l1 will show you the correlation (I think).  And you can
make it disappear (I think) by centering x for each subject on the
mean for that subject.  Or you can reduce it to a low number by
centering on something else, such as the grand mean.  Or it may be
pretty low without any transformation.  Or it might not matter much,
so long as it isn't really high.

Obviously all this is pretty uncertain, so I hope someone will set me
straight if it is wrong.

Jon

On 01/18/11 00:19, Steven Piantadosi wrote:
> Hi All,
> 
> Unless I'm out of date, p values are broken on glmer too? I wonder if an
> easy solution to these two problems might be to implement a
> bootstrapping/resampling algorithm on mixed effect regressions. Does
> anyone know about this--would it be conservative or anticonservative or
> a problem on data sets of typical size in psycholinguistics? 
> 
> If this is actually a good idea, and someone could point me to a
> reference on how bootstrapping would work on such models (I know
> references for simple non-mixed effect regressions, but not how
> bootstrapping interfaces with repeated subject/item measurements and
> random effects), I'd be happy to try to put some friendly code
> together. 
> 
> ++Steve
> 
> > pvals.fnc works for models that have random intercepts, but not for 
> > models with random slopes.  My question is whether anyone has 
> > implemented something analogous to pvals.fnc for models with random 
> > slopes. 

-- 
Jonathan Baron, Professor of Psychology, University of Pennsylvania
Home page: http://www.sas.upenn.edu/~baron


More information about the ling-r-lang-L mailing list