Dear R users,
I'm having some problems trying to create a routine for a bootstrap
resampling issue. Suppose I've got a dataset like this:

Header      inr         inf           .....    weeks     ...
 inside        above        under

1280001    2.75      2.5         ......        0         ....
 1                0              0
1280001    3.48      2.5         ......        1         ....
0                1              0
     .             .      .             .
     .             .

i.e. a dataset with n subjects identified by the column "header", with a set
of repeated mesaures. The amount of repeated measures for each subject is
57, with a few of them being more or lesse frequent. That is, generalizing,
that I haven't got the same number of observations for each patient.
I've created a function allowing me to to reorder, subsetting and calculate
some statistics over this dataset, but now I need to bootstrap it all. I was
looking for a routine in R that could resample longitudinal data, in order
to resample "on the ID of the subjects". This means that while resampling
(suppose m samples of n length) I wish to consider (better with replacement)
either none or all of the observations related to a subject.
So, if my bootstrap 1st sample takes the patient with header 1280001, I want
the routine to consider all of the observations related with a subject with
such a header.
Thus, I shall obtain a bootstrap sample of my original dataset to wich apply
the function cited before (whose only argument is the dataset).
Can anybody help me? I'm trying to understand how the rm.boot function from
Hmisc package resamples this way, but it's not that easy, so if anyone could
help me I'd be very grateful.
Thanks in advance
Niccolò

        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to