Dear list, 
 
I have a two-fold question to ask. Firstly I would like advice about the correct specification of an lme model that I am trying to run using nlme in R. Secondly I would like information about an error message that comes up when I run my model. 
 
I am wanting to identify the main drivers of inter-variability in burnt area savanna systems in southern Africa. I have long term data (20-50 years per park) from 11 different national parks in the region. There are strong theoretical reasons to believe that variance in rainfall drives variance in burnt area between years, but I would like to test how generalisable that is across parks (i.e. whether the relationship is the same in different parks), and whether other potential drivers (like length of the dry season) are also important. 
 
I therefore have a dataset called "badat" which consists of the following variables: "park"  (factor identifying individual parks), "year" (the year in question),  "percBA" (percentage of the park that burnt in that year), "rainfall" (accumulated rainfall of the previous season), and "seasonality" (how seasonal this rainfall was). There are various other factors that i might consider later but these are not important to the question I want to ask here. 
 
My first question is fundamental to the rest of the analysis. Because I am interested in variability between years, and not in differences in overall average burnt area, I decided to calculate the anomalies of all my input data and run the lme models on these data. I therefore created a new dataset "anomDat" which represents the anomalies from the mean value for each park for all of the variables defined above. 
 
i.e. instead of writing a model
 
lm1 <- lme(percBA~rainfall+seasonality, dat = badat, random = ~rainfall|park)
 
I want to test a model:
 
lm2 <- lme(baAnom~rainAnom+ seasonAnom, dat = anomDat, random = ~rainAnom|park) 
 
My reasons for doing this are that there are many other factors that control how much of a landscape burns - none of which are included in my model. I do not believe I can develop a reasonable prediction of percentage burnt area with these model inputs, but I do believe I can predict the change from one year to the next. Also lm2 would be much easier to interpret, and I hope to bring differences between parks - such as the total annual rainfall in as higher-level grouping factors at a later stage (I this way the analysis is quite similar to the MathAchieve analysis by John Fox - where the mean socio-economic status of each school is used as a factor when testing how well socio-economic status of individuals in a school affects maths achievement)
 
However, when I try to run lm2 I get the following error message:
 
"Error in y[revOrder] - Fitted : non-conformable arrays"
 
I am assuming this error has to do with the fact that I transformed percBA into baAnom: I cant seem to run an lme model on anomaly data. We have previously run the same model in SAS, so I believe there is nothing theoretically wrong with what I am doing. 

Any advice??
 
Thank you 
 
Sally
 
 

 
 
 
*****************
Sally Archibald
Research Scientist
CSIR
Tel: 012 841 3487
Fax: 012 841 4322
Cell: 083 966 2544

-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous ...{{dropped:9}}

