Hi Marc, Ken Beath described a growth curve model with time-varying covariates in Statist Med 2007; 26:2547-2564, where his example was the effect of breastfeeding on infant weight. His appendix includes the relevant R code. My CRAN sitar library implements a simplified version of his model without the time-varying element. Best wishes, Tim --- tim.cole at ucl.ac.uk<mailto:tim.cole at ucl.ac.uk> Phone +44(0)20 7905 2666 Fax +44(0)20 7905 2381 Population Policy and Practice Programme UCL Great Ormond Street Institute of Child Health, London WC1N 1EH, UK Date: Wed, 23 Nov 2016 15:58:18 +0100 From: Marc Jacobs <marc.jacobs012 at gmail.com<mailto:marc.jacobs012 at gmail.com>> To: r-sig-mixed-models at r-project.org<mailto:r-sig-mixed-models at r-project.org> Subject: [R-sig-ME] Time-varying random effects Hi, By request of Prof. Bolker, i am posting my question here. I am currently in the process of analyzing a growth model in pigs. Due to the confidentiality of the data, I cannot add any data which is of course the preferred course, but I hope to gain some insight here. I apologize in advance if the description is unclear. The data shows growth in 300+ pigs over 168 days, measured on 11 time-points. These 168 days can be divided in three separate phases: farrowing/mom (2 timepoints), nursery (4 timepoints), and growth-finish (5 timepoints). During each of these phases, the animals are placed in different rooms and pens (nested in the rooms), which by definition are random factors. Also, there is a genetic dependency of pigs (litter) nested in moms, which would be a crossed effect, since the effect takes place across the entire dataset, separate from the room/pen (pigs are separated from the litter after the farrowing/mom phase). As such, from my point of view, the room/pen are now time-varying random effects. Since I wish to model the entire growth curve, I was wondering if anybody knows how to incorporate time-varying random effects? My gut feeling tells me this is quite easy, but my models do not converge. If you need more information, please let me know. Marc
R-sig-mixed-models Digest, Vol 119, Issue 26
1 message · Cole, Tim