Skip to content
Prev 98 / 7420 Next

nlme model specification

Dear R-sig-eco:

Many thanks to all of those who took the time to reply to my question.  The diversity of replies has made me go back and try to clarify my question.  Apologies for the length of the e-mail.  Thanks in advance to anyone willing to plow through this and understand it.  If you're ever in Middlebury I'll buy you a beer.

To repeat, I have 300 trees, ranging in size from 10 - 150 cm diameter (big trees).  To simplify my original question, let's say I want to understand the relationship between growth and two variables, diameter (continuous) and vine load (ordinal index from 1-4). I'd also like to know the relative importance of diameter vs. vine load, e.g. by partial R2.  If I had one year of data, this would be a simple regression.

However, I have 9 years of annual measurements on the trees.  It's as if I have the above analysis repeated 9 times.  There was no initial treatment, so I view these 9 years as a random sample of the years in the life of the tree, and unlike most examples of repeated measures I have read, the time effect is of no interest whatsoever. That is, I am not interested in viewing xyplot(growth ~ time|id).  I don't expect to see any consistent directional response to time.  In a way, it's as if the 9 years represent blocks, (except that it's the same 300 trees in each block) -- this is why I view the yr as a random effect, and as the grouping variable.

If I were to graph the data, I would use xyplot(growth ~ diameter|yr) to see what I am most interested in.  Grouping by individual doesn't make sense to me here because each individual only represents a very small slice of the full range of measurements - e.g. over the ten years, each tree only grows from 10 cm - 14 cm, so I can't really estimate the growth vs. diameter relationship for each tree.  xyplot(growth ~ diameter|id) would not be useful. This is why I don't consider the individual to be the grouping variable, but perhaps I am wrong on this.

So, now, as before, I am back to

fit <- lme(fixed = growth ~ diameter * vines, random = ~ 1|year)

I'm expecting that this will estimate separate intercepts for each year.  Which is what I want (I would like to fit separate slopes by year too, but that model didn't converge).

I guess what I'm most concerned about is whether the significance tests obtained for each term use the appropriate error term and the appropriate degrees of freedom.  I'm currently using something like the following command to test the effect of diameter

anova(fit.full.model, update(fit.full.model, . ~ vines))

But maybe I'm way off base there.

Thanks very much!

Matt Landis