[R-sig-ME] 3-level fixed factor in lme4
Obermeier Andrew
andrewobermeier at me.com
Thu Sep 13 03:24:00 CEST 2012
Hello Mixed Modelers,
I came to this list with a question a couple months ago, and will admit it was a very humbling experience. There were a few kind responses, but my question was mostly ignored or I was told I needed to read basic statistics books. I take full blame for this, and know that I was not asking my question in the right way. Now, 2 months later, I am trying again.
I am not a statistician but want to learn. Especially, I like learning statistics with R because it helps me to see the nuts and bolts of statistics much more than the big commercial user interface packages do, and I get a much better feel for how to look at data.
I am writing a dissertation in second language acquisition, analyzing my data using lme4 for a mixed model with subjects and items set as random effects. My dependent variable is reaction time (RT). My independent variable is Target Condition (TarCond). TarCond is a three-level factor: nonword, related, unrelated.
When I run the model, lmer provides the summary below. The Fixed effects section tells me that for the three factors of my independent variable I get the following mean reaction times (RT), and all of these have big t values:
nonword (Intercept): 1239.64
TarCondrelated: 1239.64 - 370.72 = 868.92
TarCondunrelated: 1239.64 + 318.34 = 1557.98
(lmer summary)
-----------------------------------------------------------------
Linear mixed model fit by REML
Formula: RT ~ TarCond + (1 | Subject) + (1 | Item)
Data: postest
AIC BIC logLik deviance REMLdev
30949 30982 -15468 30966 30937
Random effects:
Groups Name Variance Std.Dev.
Item (Intercept) 22371 149.57
Subject (Intercept) 65149 255.24
Residual 560665 748.78
Number of obs: 1920, groups: Item, 96; Subject, 20
Fixed effects:
Estimate Std. Error t value
(Intercept) 1239.64 65.61 18.894
TarCondrelated -370.72 56.13 -6.605
TarCondunrelated 318.34 56.13 5.672
Correlation of Fixed Effects:
(Intr) TrCndr
TarCondrltd -0.285
TarCndnrltd -0.285 0.333
----------------------------------------------------------------------
Since the t values in the above model were all well above 2 or below -2, I read that this might mean I have a significant effect.
I followed the analysis in Baayen, Davidson, and Bates' (2007) article titled "Mixed-effects modeling with crossed random effects for subjects and items." Though this article informs me that p-values calculated with the degrees of freedom used by pvals.fnc will be "anti-conservative", I proceeded to analyze the fixed effects in this model with Markov chain Monte Carlo sampling.
-------------------------------------------------------------------------------------------------
> mcmcpostest <- pvals.fnc(postest.lmer, nsim = 10000)
> mcmcpostest$fixed
Estimate MCMCmean HPD95lower HPD95upper pMCMC Pr(>|t|)
(Intercept) 1239.6 1239.5 1108.9 1365.0 0.0001 0
TarCondrelated -370.7 -371.2 -474.6 -263.8 0.0001 0
TarCondunrelated 318.3 317.8 214.3 428.8 0.0001 0
-------------------------------------------------------------------------------------------------
My apologies for this long preamble, but my questions are as follows.
(1) Is this analytical procedure appropriate?
(2) Specifically, is it OK for me to test the significance of a 3-level factor in this way? (My advising professor tells me that the t value can only be used to compare 2 means.)
(3) How does lme4 calculate t values for a factor that is greater than 2 levels.
Below I have attached my dataset in CSV format. If there is any other information I need to provide, please let me know and I will very gladly do so.
My apologies if my questions are misguided or inappropriate. I am way out of my league here.
I would be very grateful for any attention that anyone can offer to my questions.
Sincerely,
Andrew Obermeier
Associate Professor, Kyoto University of Education
PhD Candidate, Temple University Japan
-------------- next part --------------
More information about the R-sig-mixed-models
mailing list