I have two dependent variable Prime Type (five levels), and Prime Relatedness (two levels), and one dependent variable; Reaction Time (RT). I have ran a linear mixed-effect model in R using the following formula for lme4 package:
data.mod1=lmer(RT~Related*PrimeType*(1|Subject)+(1|Item),mydata)
Then I ran a similar formula for nlme package
data.mod1.lme=lme(RT~Related*PrimeType, random=~1|Subject/Item,mydata)
Considering that these models are analyzing the same data set using linear mixed effect models, the t-test show different values! In fact, for one of the variables it shows a significant p-value in nlme model but not in lme4 package:
nlme.variable t=-1.98707 p-value=0.0470
lme4.variable t=-1.14 p-value=0.2917866*
The p-value in lme4 is not calculated and sampMCMC is no longer available, I had to calculated using the following formula 2(1 - pt(abs(x), df)) --> 2*(1 - pt(abs(-1.14), 7))
My question is that why are the t-values differ between the two packages. Do I need to change or add something in R to have both models show the same t-values? Also, is my calculation of the p-value wrong? If yes, what is the correct way for it to be calculated it?
EDIT: nlme experts - what is the correct code for the above mentioned formula to add cross random effect?