[R-sig-ME] strategy to iterate over repeated measures/longitudinal data
Juliet Hannah
juliet.hannah at gmail.com
Tue Jul 21 16:02:40 CEST 2009
Hi Hadley,
I wanted to check if there is anything obviously incorrect/inefficient with the
strategy I outlined. I can, of course, try out various wide to long
conversions.
But apart from that, I was
worried that I should try to convert the data all at once beforehand,
and iterate
through the converted data somehow.
If you see nothing horribly wrong with my current strategy, then
that is helpful in itself. :)
My main concern is efficiency and memory use. Speed is a secondary
concern. Really, I just want it to work. In looping through
this data (when I wasn't using repeated measures), I have had
several problems with memory usage going up (about 20G). I never
figured it out (using GEEs for that one), but I suspected that
maybe I wasn't iterating in a proper manner. Now when I am going
to use all of the measurements, I fear I am going to run into
more problems.
Thanks for responding.
Regards,
Juliet
On Tue, Jul 21, 2009 at 9:42 AM, hadley wickham<h.wickham at gmail.com> wrote:
>> For each predictor:
>> 1. create a long data set using the predictor and all measurements
>> (using make.univ function from multilevel package)
>> 2. run lmer, extract the coefficient of interest
>> 3. go to next predictor
>>
>> The end result is a vector of 400,000 coefficients.
>>
>> Do you have any suggestions on how I can improve this strategy?
>
> What sort of improvement are you looking for? Speed? Elegance? Ease of use?
>
> Hadley
>
> --
> http://had.co.nz/
>
More information about the R-sig-mixed-models
mailing list