[R] Problem trying to use boot and lme together
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Jun 22 00:09:36 CEST 2005
On Tue, 21 Jun 2005, Douglas Bates wrote:
> On 6/21/05, Søren Højsgaard <Soren.Hojsgaard at agrsci.dk> wrote:
>> 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
More information about the R-help
mailing list