Skip to content

p-value for fixed factor in lmer

8 messages · Volker Dellwo, Jonathan Baron, Philippi, Tom +5 more

#
Dear Mixed Model users,

below is an lmer function for which I calculated p-values with 
pvals.fnc. In the output I receive five p-values for the fixed factor 
'tempo', one for each level. What I would want, however, is a p-value 
for the entire factor which I can't manage....

Many thanks for any suggestions!

Best wishes,
Volker


MODEL:
> print(pvals.fnc(modelA))

OUTPUT:

$fixed
             Estimate MCMCmean HPD95lower HPD95upper  pMCMC Pr(>|t|)
(Intercept)  42.7346  42.7392    40.2256    45.1771 0.0001   0.0000
tempo2       -0.1815  -0.1822    -1.0326     0.7087 0.6728   0.6737
tempo3        0.7979   0.8023    -0.0953     1.6719 0.0768   0.0645
tempo4        1.1526   1.1504     0.2812     2.0028 0.0088   0.0077
tempo5        1.2742   1.2740     0.4183     2.1488 0.0042   0.0032

$random
     Groups        Name Std.Dev. MCMCmedian MCMCmean HPD95lower HPD95upper
1  speaker (Intercept)   3.4334     2.3338   2.3684     1.7773    3.0468
2 sentence (Intercept)   3.6911     2.5546   2.6462     1.6115    3.7921
3 Residual               3.1209     3.1974   3.2010     3.0061    3.4117
#
On 05/16/13 00:03, Volker Dellwo wrote:
aovlmer.fnc() in languageR?
#
Hello,
To be valid, a LRT on a fixed effect must be done on lmer models 
estimated with the option REML=F in the lmer() call  :

modelA <- lmer(percentV ~ tempo + (1|speaker) + (1|sentence), REML=F, 
data=bt.data)

For example, you may look at:
glmm.wikidot.com/?
especially the FAQ

Robert Espesser
CNRS UMR  7309 - Universit? Aix-Marseille
5 Avenue Pasteur
13100 AIX-EN-PROVENCE



Le 16/05/2013 01:37, lborger a ?crit :
#
Hi.
I've read some stuff on problems estimating p-values in mixed models 
(Bates wrote something about it, hence it was not introduces in lme4; 
you get only t-values but not p). As i understand it, you could resort 
to 3 practice. 1. take the t-value as z-value (that's the approach that 
Baayen advocate under most circumstances, if i recall it correctly).
2. use MCMC sampling
3. make a model comparison (like Luca suggested)

I'd go with the model comparison (I think it is the most robust way) and 
gives you the estimates of significance for the factos as a whole (not 
for the dummy coding in the background).
Hope it helps.

Regards,

Marko
On 16.05.2013 01:37, lborger wrote:
#
Alternatives to the options mentioned:

- function mixed() in package afex (disclaimer: I am the author of said package)

modelA <- mixed(percentV ~ tempo + (1|speaker) + (1|sentence),data=bt.data)

- anova(..., test = "F") in package car (author is John Fox):

modelA <- lmer(percentV ~ tempo + (1|speaker) + (1|sentence),data=bt.data)
anova(modelA, test = "F")

Both use KRmodcomp from pbkrtest to obtain p-values (which was mentioned by Tom Philippi) and should return the exact same values.

Benefit over pvals.fnc is that the random effects can include random slopes!

Cheers,
Henrik  


Am 16/05/2013 00:03, schrieb Volker Dellwo: