# lme summary() interpretation

Need some help interpreting the summary() -function results.

I am running a lme from the package nlme in R.

I have a simple (and quite small) dataset with three grouping variables: origin, genotype and time, response is a continuous variable named Maxi.

Origin = 2 levels, called Ka and La

Genotype = 3 levels nested within origin Ka and 2 levels nested within origin La

Time = 2 levels nested within each genotype

I am interested in the main effects of Origin, Time and their interaction. In addition to testing I'd like to have their estimates. I want to model the random part as Genotype nested within Origin. Here's the model I had in mind:

model = lme(fixed = Maxi ~ Origin*Time, random = ~ 1 |Genotype)


anova()s etc work fine and there's actually no significant interaction, but

here's the problem:

when I run summary(model), I get:

Fixed effects: Maxi ~ Origin * Time
Value Std.Error DF   t-value p-value
(Intercept)                    15.399386 1.1127382 20 13.839181  0.0000
OriginLa                       -1.986388 1.7702416  3 -1.122100  0.3435
Timeeve                         0.074444 0.8942694 20  0.083246  0.9345
OriginLa:Timeeve               -1.387448 1.5648876 20 -0.886612  0.3858


Where are my estimates for the other levels of the factors? I thought that to be able to interpret these fixed effects the summary-table would have to show all the levels in some manner? Or do I interpret this such that:

1. the estimate for OriginKa is 15.399386
2. the estimate for OriginLa is 15.399386-1.986388
3. the estimate for Timemor is 15.399386
4. the estimate for Timeeve is 15.399386+0.074444

and then I can't even guess how to interpret the interaction estimate...

It doesn't feel intuitively right that the estimates would be the same for both a level of the Origin -factor and a level of the Time factor.

Notes:

1. I did NOT make my data into a groupedData (is it always necessary?)
2. I wanted to include random = 1 ~ |Origin/Genotype in the model but that produced NaNs in the output, apparently the model became too complex or my data is arranged wrongly?

So the Questions are:

1. How do I interpret the summary to get the estimates, or is there something wrong here, or is there another way of getting the estimates. I need the estimates for both levels of Time within both Origins.
2. How do I specify the random effects with this data structure? Have I done it right?

Any pointers?

Here's the data needed to reproduce my problem:

Orig.Genot.Time Maxi
Ka  Ka1     mor 14,59
Ka  Ka1     eve 13,42
Ka  Ka11    mor 14,08
Ka  Ka11    eve 16,29
Ka  Ka15    mor 14,38
Ka  Ka15    eve 14,56
La  La1     mor 17,82
La  La1     eve 13,28
Ka  Ka1     mor 16,44
Ka  Ka1     eve 15,52
Ka  Ka15    mor 13,76
Ka  Ka15    eve 13,55
Ka  Ka1     mor 19,15
Ka  Ka1     eve 19,12
La  La6     mor 10,54
La  La6     mor 11,38
La  La6     eve 10,48
Ka  Ka15    mor 15,25
Ka  Ka15    eve 16,51
La  La1     mor 17,46
La  La1     eve 15,57
Ka  Ka1     mor 16,83
Ka  Ka1     eve 15,63
Ka  Ka15    mor 14,54
Ka  Ka15    eve 15,09
La  La1     mor 11,3
La  La1     eve 11,94


The question of how to understand the coefficients is a FAQ. You have two factors with two levels each. Thus, there are four means. You have four parameters ((Intercept), OriginLa, Timeeve, and OriginLa:Timeeve). With them you can recreate your four means. Your "do I interpret..." is essentially right, except that OriginLa, e.g., is only the difference between OriginKa and OriginLa when Time is mor, and Timeeve is only the difference between Timeeve and Timemor when Origin is ka. To compute the mean where Origin is La and Time is mor, you sum all four coefficients. It may help you to read my answers here: Interpretation of betas when there are multiple categorical variables, and here: Interpretation of interaction term.
• I thought this might be a FAQ, and was hesitant to ask, so thanks for answering! This is a bit off-topic, but is there no function in nlme to automatically extract these? Or in another package? Even if one really should know how to do the calculation. I think I might be able to do it with predict.lme, but so far haven't been able to set up the correct newdata -dataframe, perhaps because of the interaction-term? data.frame(Origin = c("Ka", "Ka", "La", "La"), Time = c("mor", "eve", "mor", "eve")), returns cannot evaluate groups for desired levels on 'newdata' – tuhinokkaeläin Feb 23 '15 at 19:28
• @tuhinokkaeläin, it's OK to ask. We prefer you search the site 1st, but then you might not know what to search for. Note also that you asked about the proper specification of the RE, which is definitely on-topic here, & which I didn't answer (I'm honestly not certain); hopefully someone will provide that information soon. W/o running your model, I'm not sure why predict didn't work. You could ask on Stack Overflow, since you do have a reproducible example. – gung - Reinstate Monica Feb 23 '15 at 19:32
• @tuhinokkaeläin, close. The mean of OriginLa, Timeeve is $\beta_0 + \beta_1 + \beta_2 + \beta_3$, whether or not the interaction is significant. – gung - Reinstate Monica Feb 23 '15 at 20:44
• Aha right! I think I get it now. I suppose I got confused and somehow got this mixed up with another problem I've been tackling; the general recommendation is not to interpret the main effects if the interaction is significant, right? In this case, if the interaction was significant, I could not trust the anova() results for Origin or Time, correct? Similarly, should I then also forfeit making multiple comparisons? Or is that exactly what I should then do, via contrasts (i.e. test simple main effects)? Which leads to another hardship; how to define the contrast matrix in this case... – tuhinokkaeläin Feb 23 '15 at 21:45