My problem can be summarized very simply: I'm using a linear mixed-effects model and I am trying to get p-values using
pvals.fnc(). The problem is that this function seems to have some trouble estimating p-values directly from the t-values associated with model coefficients (Baayen et al., 2008), and I don't know what is going wrong with the way I do it (i.e. according to what I have read, it should work). So, I'm explaining my model below, and if you can point out what I am doing wrong and suggest changes I would really appreciate it!
DESCRIPTION: I have a 2 by 2 within subjects design, fully crossing two categorical factors, "Gram" and "Number", each with two levels. This is the command I used to run the model:
>m <- lmer(RT ~ Gram*Number + (1|Subject) + (0+Gram+Number|Subject) + (1|Item),data= data)
If I understand this code, I am getting coefficients for the two fixed effects (Gram and Number) and their interaction, and I am fitting a model that has by-subject intercepts and slopes for the two fixed effects, and a by-item intercept for them. Following Barr et al. (2013), I thought that this code gets rid of the correlation parameters. I don't want estimate the correlations because I want to get the p-values using pvals.fnc (), and I read that this function doesn't work if there are correlations in the model.
The command seems to work:
>m Linear mixed model fit by REML Formula: RT ~ Gram * Number + (1 | Subject) + (0 + Gram + Number | Subject) + (1 |Item) Data: mverb[mverb$Region == "06v1", ] AIC BIC logLik deviance REMLdev 20134 20204 -10054 20138 20108 Random effects: Groups Name Variance Std.Dev. Corr Item (Intercept) 273.508 16.5381 Subject Gramgram 0.000 0.0000 Gramungram 3717.213 60.9689 NaN Number1 59.361 7.7046 NaN -1.000 Subject (Intercept) 14075.240 118.6391 Residual 35758.311 189.0987 Number of obs: 1502, groups: Item, 48; Subject, 32 Fixed effects: Estimate Std. Error t value (Intercept) 402.520 22.321 18.033 Gram1 -57.788 14.545 -3.973 Number1 -4.191 9.858 -0.425 Gram1:Number1 15.693 19.527 0.804 Correlation of Fixed Effects: (Intr) Gram1 Numbr1 Gram1 -0.181 Number1 -0.034 0.104 Gram1:Nmbr1 0.000 -0.002 -0.011
However, when I try to calculate the p-values I still get an error message:
>pvals.fnc(m, withMCMC=T)$fixed Error in pvals.fnc(m, withMCMC = T) : MCMC sampling is not implemented in recent versions of lme4 for models with random correlation parameters
Am I making a mistake when I specify my model? Shouldn't
pvals.fnc() work if I removed the correlations?