Hello all

I'm having a bit of trouble in understanding/determining the form of crossed random effects in an lme model that contains a temporal autocorrelation term. I was wondering if someone could help? I'm using lme because of its autocorrelation structure capabilities.

Nlme package (3.1-100), R version 2.13.0 (2011-04-13), system (windows XP)

My study investigates the environmental correlates of growth variation in fish (growth measured as otolith increments- analogous to tree rings). The data is outlined below. Essentially I have growth data (14531 obs) from 1034 fish (ID). As fish date of capture is known, I can assign an age to each increment (2-41) as well as a year (data spans 46 years, 1962-2007). Not every fish has a record for each year (e.g. younger fish not yet born) and nor is each age represented in each year (e.g. older ages only present more recently). Environmental data (SOI, AnnMDF and temp) are annualised measures.

str(epgrowth)
'data.frame':   14531 obs. of  8 variables:
$ year  : Factor w/ 46 levels "1962","1963",..: 1 2 3 3 4 4 5 5 5 5 ...
$ AnnMDF: num  385 656 357 357 230 ...
$ SOI   : num  6.667 0.275 4.575 4.575 -7.1 ...
$ temp  : num  14.3 14.2 14.1 14.1 14.1 ...
$ ID    : Factor w/ 1034 levels "1286","1287",..: 244 244 244 296 244 296 244 847 296 213 ...
$ DOB   : int  1960 1960 1960 1962 1960 1962 1960 1964 1962 1964 ...
$ age   : int  2 3 4 2 5 3 6 2 4 2 ...
$ growth: num  0.2058 0.1279 0.0919 0.1889 0.1126 ...
str(epgrowth)

I need to include a random term to account for the repeated measures nature of the data and the strong possibility that not only is growth age dependent (and this effect could differ among individuals), but that growth at age t will be correlated to growth at age t-1.

I have successfully fitted the following models (and their random effects simplifications):

g1<- lme (log(growth) ~ log(age) + AnnMDF + SOI + temp, random = ~ log(age)|ID, data = epgrowth, correlation=corAR1(form=~age|ID))
g2<- lme (log(growth) ~ log(age) + AnnMDF + SOI + temp, random = ~ log(age)|year/ID, data = epgrowth) #(nested ID in year, so not what I'm after and cannot add correlation structure to this anyway).

However, I would also like to explore the utility of a random term to account for among-year variation not captured by my fixed effects. I am not particularly interested in documenting a temporal trend (as per other time series studies), so don't want to include 'year' as a numerical fixed effect. I read somewhere that to be a crossed random effect, 'year' needs to be a factor. I also read that lme doesn't deal very well with lots of levels in crossed random effects (like I have). I've read Pinherio and Bates' section on crossed random effects (p. 163) but didn't fully understand the specification of pdBlocked and pdIdent.

Is it possible to fit crossed random effects in this example (keeping the correlation structure, then simplifying if needed) , and if so how would I go about it?

Kind regards

John


	[[alternative HTML version deleted]]


