Nested data analysis using nlme: Analysis leaves out factor levels
I have a few questions regarding the analysis of nested data from an experiment. In the study, participants viewed 50 stimuli for 3 durations (50 ms, 500 ms, and 1000 ms, within-subjects, resulting in 150 trials per participant) and provided 3 responses for each stimulus presentation. There were 2 groups of participants (between-subjects conditions), one group saw the stimuli in a darkened version and the other group saw lighter versions of the stimuli. The order of presentation was completely randomized (both regarding the stimuli and their duration of the presentation). The data is currently in long format (each trial is a row with the stimulus id, participant id, gender, duration, condition, and the three responses). What is the best way to analyze this type of data using R?
I have tried a mixed effects model (nlme) with subject id as random factor:
model_lme<-lme(response1 ~ condition * duration, random=~1|subj,data=dat)
In my results, I only get two of the three levels of the factor duration:
Fixed effects: response1 ~ condition * duration Value Std.Error DF t-value p-value (Intercept) 4.094293 0.08266924 9979 49.52619 0.0000 condition1 0.122374 0.08266924 65 1.48028 0.1436 duration1 -0.315817 0.02026158 9979 -15.58699 0.0000 duration2 -0.004890 0.02026158 9979 -0.24135 0.8093
Am I using nlme correctly? Why is one level missing?