[R-sig-eco] Fwd: nlme model specification
Péter Sólymos
psolymos at gmail.com
Thu May 22 22:43:35 CEST 2008
Dear List,
here is my response from today and yesterday to Matt's question, that
was missed. I sent
my first message from an unsubscribed e-mail address. Sorry for that.
Peter
Matt,
I am now absolutely confused. Am I right that you have 3 measurements
per individuals per year? In other words, you measured growth (in cm?
or what is growth) diameter and vine load. And I think you want to
partial out the variation.
If so, your problem became a multivariate problem, when you have 3
response variables measured on same individuals, plus some grouping
variables (inds, yr). Than you can easily use multiple regression to
partial the variation. I have never saw a multivariate mixed model, so
I think you don't have to try too hard.
Let me know if I was able to understand it.
Yours,
Peter
ps: I don't know why my letter did not wet out to the list.
---------- Forwarded message ----------
From: Péter Sólymos <Solymos.Peter at aotk.szie.hu>
Date: Wed, May 21, 2008 at 10:21 PM
Subject: Re: [R-sig-eco] nlme model specification
To: "Landis, R Matthew" <rlandis at middlebury.edu>, "r-sig-ecology at r-project.org"
Dear Matthew,
I think that your case is a bit different than you proposed, since, -
if I am right based on your letter - you have repeated measures for
the same 300 trees over 9 successive periods (resulting in 2700
measurements). So observations are not only biased by some spatial or
temporal non independence (like in case of a wildlife survey), but
essentially the subjects are the same. I mean that observations are
not really grouped in time. I would prefer a model with fixed model
term as you wrote, a random factor like ~1| tree.individuals and an
explicitly defined correlation structure with corAR1 or corARMA (or
you can define groups for individuals within correlation term).
This can be done with gls in nlme package, or glmmPQL in MASS.
Probably there are options in lme4 but I haven't tried those.
The problem becomes more complicated if the growth is not linear, but
follows an allometric relationship. In this case you should use nlme
function. Further, there might be problems with variance homogeneity,
than you shoud define a variance function, too. These are all covered
in the P-B book as far as I remember.
Hope this helps, and sorry if I made some chaos instead of a clear-cut answer.
Best,
Peter
--
Peter Solymos, PhD
Institute for Biology
Faculty of Veterinary Science
Szent Istvan University, Hungary
http://www.univet.hu/users/psolymos/personal/
mefa R package
http://mefa.r-forge.r-project.org/
On Wed, May 21, 2008 at 7:54 PM, Landis, R Matthew
<rlandis at middlebury.edu> wrote:
> Greetings R-eco folks,
>
> I'm trying to analyze a dataset on tree growth rates to see which factors are important (and their relative importance too, if I can get that), and I'm having some trouble figuring out how to specify the model, despite having carefully read Pinheiro and Bates, the help files for nlme, Crawley's book on Statistics with S, MASS, and other books besides.
>
> The dataset consists of ~ 300 trees measured annually for 10 years. So, I have 9 pseudo-replicated intervals over which to assess growth (about 2700 rows in the dataset). There are 5 different explanatory factors, which are a combination of continuous variables and categorical factors. Some of these vary with time. In the end, I would like to get both coefficient estimates and partial R2 (or some other way of ranking them) for each factor. Unlike most time-series examples in the books, I am not interested in how growth varies with time, nor am I particular interested in interactions of explanatory factors with time.
>
> Based on this, I've convinced myself that I should specify the model as:
>
> fit <- lme(fixed = growth ~ (x1 + x2 + x3+ x4 + x5)^2, random = ~1|year, method = 'ML')
>
> Year is clearly a random effect, and is the grouping variable for the analysis. Each of the other coefficients is "inner" to this variable. I'm ignoring individual tree as a grouping factor, since I don't want to estimate separate coefficients for each tree. Does this sound like the correct way to do this?
>
> Thanks for any help. Apologies if this is more of a statistics question and less of an R question.
>
> Matt Landis
>
> ****************************************************
> R. Matthew Landis, Ph.D.
> Dept. Biology
> Middlebury College
> Middlebury, VT 05753
>
> tel.: 802.443.3484
> **************************************************
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
More information about the R-sig-ecology
mailing list