0

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. 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:

    the estimate for OriginKa is 15.399386
    the estimate for OriginLa is 15.399386-1.986388
    the estimate for Timemor  is 15.399386
    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?

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

1 Answers1

-1

I have also recently been struggling with lme(). For one, I know that your random effects syntax is incorrect. It should be random = ~ 1 | Origin/Genotype, if genotype is a nested factor within origin. Also, the reason your summary seems incomplete is again your syntax. The formula should be

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

if you want to test Origin, Time, and the combination of Origin and Time. Because you didn't include the individual terms in your formula, it didn't calculate any correlations between these terms. You are essentially testing only the combined factor, not the individual ones. Also, if you want to test the interaction of origin and time as opposed to the combined effect, it should be Origin:Time, not Origin*Time.

WaterGeek
  • 11
  • 3
  • Generally `Origin*Time` is shorthand for `Origin + Time + Origin:Time`, so that actually seems OK to me. Maybe you could explain what the summary output of the model means? Some related material in [this question/answers](http://stackoverflow.com/questions/17794729/test-for-significance-of-interaction-in-linear-mixed-models-in-nlme-in-r) – aosmith Jan 21 '16 at 17:18
  • This is actually an old question, I posted this about a year ago, so not completely relevant anymore. However, some comments: – tuhinokkaeläin Feb 03 '16 at 13:51
  • 1) I too think that Origin*Time is correct shorthand notation 2) I do understand now how to interpret the summary, for others who are interested I learned it from the master: [link](http://stats.stackexchange.com/questions/138516/lme-summary-interpretation) 3) @WaterGeek, are you sure about nesting? I seem to remember that depending on your data structure you can use either style of syntax... – tuhinokkaeläin Feb 03 '16 at 13:58
  • What I was referring to in 3) was something to this effect: https://stat.ethz.ch/pipermail/r-sig-mixed-models/2010q2/003607.html. I, for example, have uniquely labeled my Genotypes under each Origin, so the way I understood, I don't necessarily need to specify the random part as ~1|Origin/Genotype, but instead I can simply use ~1|Genotype, and I'm still using a nested model – tuhinokkaeläin Feb 03 '16 at 14:17
  • Thanks for the corrections guys! My current working experience with lme is to look at several stream sites that were observed over many years, before and after a treatment was applied. In order to include the random effect of a site in a year I used ~ 1 | Year/Site. If I only cared about random effects at sites I would use ~1 | Site as OP mentions above. Comparing the models with anova() showed that this was a better result than using ~ 1 | Site, a combination of ~1 | Site + ~ 1 | Year/Site, or neither. – WaterGeek Feb 04 '16 at 20:28