[R] nlme correlated random effects

Spencer Graves spencer.graves at pdf.com
Tue Jun 26 17:57:52 CEST 2007


      I haven't seen a reply to this, so I will offer a comment in case 
you haven't already solved the problem. 

      Have you consulted the "Mixed-Effects Bible for S-Plus / R", 
Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus 
(Springer)?  If yes, have you worked through appropriate portions of the 
book and the companion script files available with the standard R 
distribution in "~R\library\nlme\scripts"?  I just did "grep 'pdB' *.*" 
in that directory and found 5 uses of pdBlocked, 3 in ch04.R, and 1 each 
in ch06.R and ch08.R.  Also,  RSiteSearch("pdBlocked with 2 random 
effects") produced 69 hits for me just now.  You may not find anything 
useful there, but 69 does not seem to large a list to search, and there 
seems like a reasonable chance of finding something useful there. 

      Beyond this, a recommended approach to difficult questions like 
this is to try to simplify it to the maximum extent possible.  For 
example, it sounds to me like your question, "can I use pdBlocked with 
only 2 random effects", could be answered without the complexity of 
'nlme'.  What phony data set can you generate with the minimum number of 
observations and variables that could help answer this question?  The 
process of producing such a simplified example might produce an answer 
to your question.  If it doesn't, then you can submit that simple, 
self-contained example to this list.  Doing so will increase the chances 
of a useful reply. 

      I know this doesn't answer your question, but I hope it helps. 
      Best Wishes,
      Spencer Graves

Daniel O'Shea wrote:
> I am examining the following nlme model.
>
> asymporig<-function(x,th1,th2)th1*(1-exp(-exp(th2)*x))
> mod1<-nlme(fa20~(ah*habdiv+ad*log(d)+ads*ds+ads2*ds2+at*trout)+asymporig(da.p,th1,th2),
>     fixed=ah+ad+ads+ads2+at+th1+th2~1,
>     random=th1+th2~1,
>     start=c(ah=.9124,ad=.9252,ads=.5,ads2=-.1,at=-1,th1=2.842,th2=-6.917),
>     data=pca1.grouped)
>
> However, the two random effects (th1 and th2) which describe the asymptotic relationship between richness (fa20) and area (da.p) are correlated: -0.904 with approximate 95% ci of -0.99 to -.32.
> I examined the anova of mod1 with both random effects and mod2 with just th1 and mod1 is preferred.  I also examined pdDiag(th1 + th2~1) for another model (mod3) and based on the anova the original mod1 is preferred.
>
> My question is can I use pdBlocked with only 2 random effects or should I and if so how I would specify that in the model or perhaps the 95% ci for correlation is wide enough to ignore???
>
> Dan
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list