[R] Bug in lnme package?
    Ben Bolker 
    bolker at ufl.edu
       
    Mon Dec 14 17:26:29 CET 2009
    
    
  
Pieter Deleu <pieterdeleu <at> gmail.com> writes:
> 
> Hi!
> 
> Something funny happens to me in lnme. I don't know if it's a bug or not.
> Here's a short sketch of the problem (you could skip the introduction and
> just go to the models):
> 
> I'm counting the number of spider webs ( = response variable) along two
> rivers, with a two-level treatment: free-flowing and dammed.
> There are three field sites (random factor) along each river, and
> measurements are done six times (= random factor for repeated measurements).
> 
> Webs are counted on four different distances along the river (fixed effect),
> with six plots at each distance.
> 
> My model looks like this:
> 
> *
> Model<-lme(Webslog1~Treatment*Distance,
>   random=~Week|Uniquesite/Uniqueplot,method="REML")
> *
[snip]
A few suggestions:
(1) please give us a reproducible example -- either include
your data (dput() is one way to dump it in a useful form),
or post it somewhere, or make up a small data set that
demonstrates the same problem.
(2) it would probably be best to repost this question (with
reproducible example) on r-sig-mixed-models at lists.r-project.org ,
which is specially geared toward mixed model questions.
(3) you may not have your model specification
quite right.  For example, do you really intend to model
a linear increase/decrease in the response as a function of
week that varies across plots & sites?  (If so, you 
should also probably consider a fixed effect of Week).
Or do you simply want to allow plots/sites to be 
different (in which case you would say ~1|Uniquesite/Uniqueplot)?
  By the way, it's "nlme" not "lnme"
  Ben Bolker
    
    
More information about the R-help
mailing list