[R] Problem trying to use boot and lme together

Michael Dewey med at aghmed.fsnet.co.uk
Wed Jun 22 15:18:11 CEST 2005


At 23:09 21/06/05, Prof Brian Ripley wrote:
>On Tue, 21 Jun 2005, Douglas Bates wrote:
>
>>On 6/21/05, Søren Højsgaard <Soren.Hojsgaard at agrsci.dk> wrote:

Thanks everyone for your help, more comments at the foot

>>>The problem with simulate.lme is that it only returns logL for a given 
>>>model fitted to a simulated data set  - not the simulated data set 
>>>itself (which one might have expected a function with that name to 
>>>do...). It would be nice with that functionality...
>>>Søren
>>
>>You could add it.  You just need to create a matrix that will be large
>>enough to hold all the simulated data sets and fill a column (or row
>>if you prefer but column is probably better because of the way that
>>matrices are stored) during each iteration of the simulation and
>>remember to include that matrix in the returned object.
>
>Note: you don't need to store it: you can do the analysis at that point 
>and return the statistics you want, rather than just logL.
>
>I did say `see simulate.lme', not `use simulate.lme'.  I know nlme is no 
>longer being developed, but if it were I would be suggesting/contributing 
>a modification that allowed the user to specify an `extraction' function 
>from the fit -- quite a few pieces of bootstrap code work that way.
>
>--
>Brian D. Ripley,                  ripley at stats.ox.ac.uk
>Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
>University of Oxford,             Tel:  +44 1865 272861 (self)
>1 South Parks Road,                     +44 1865 272866 (PA)
>Oxford OX1 3TG, UK                Fax:  +44 1865 272595

This has been most informative for me. Given the rather stern comments in 
Pinheiro and Bates that most things do not have the reference distribution 
you might naively think I now realise that simulate.lme is more important 
than its rather cursory treatment in the book. As suggested I have looked 
at the code but although I can see broadly what each section does I lack 
the skill to modify it myself. I will have to wait for someone more gifted.

If there is to be a successor edition to Pinheiro and Bates perhaps I could 
suggest that this topic merits a bit more discussion?


Michael Dewey
med at aghmed.fsnet.co.uk
http://www.aghmed.fsnet.co.uk/home.html




More information about the R-help mailing list