[R] nlme for groupedData with inner and outer factors

Dan Bebber danbebber at forestecology.co.uk
Thu Mar 23 16:47:21 CET 2006


Hello,

I am having trouble specifying a suitable nlme model.
My data structure is described by

gd <- groupedData(ppath ~ lcut | exp, outer = ~ bait, inner = ~ weight, data 
= d)

i.e. the response (ppath) of several subjects (sub) was measured at levels 
of a continuous variable (lcut). Subjects were given either of one level of 
a factor (bait), and all subjects were measured at two levels of another 
factor (weight). Therefore bait varies among subjects and weight varies 
within subjects.

The relationship ppath ~ cut for each subject and weight appear to follow a 
logistic curve, with xmid and scal affected by bait and weight. There is 
also a random effect of subject on xmid and scal.

Any help with formulating the correct model would be greatly appreciated.

Many thanks,
Dan Bebber

Department of Plant Sciences
University of Oxford

p.s. Part of my data are shown below:

     sublcut       ppath bait weight
1   pv1_  0.0 1.000000000    1      0
2   pv1_  0.1 0.827773821    1      0
3   pv1_  0.2 0.380102502    1      0
4   pv1_  0.3 0.209151878    1      0
5   pv1_  0.4 0.076929304    1      0
6   pv1_  0.5 0.065681564    1      0
7   pv1_  0.6 0.020670108    1      0
8   pv1_  0.7 0.012817021    1      0
9   pv1_  0.8 0.008661514    1      0
10  pv1_  0.9 0.011568323    1      0
11  pv19  0.0 1.000000000    1      0
12  pv19  0.1 0.668390291    1      0
13  pv19  0.2 0.343318462    1      0




More information about the R-help mailing list