[R] Stratified Bootstrap question

From: Tim Hesterberg <timh_at_insightful.com>
Date: Thu 31 Mar 2005 - 03:05:45 EST

Dear Qian,

You might try the S+Resample library, which has built-in support for both sampling by subject and stratified sampling.

If you are a student, there is a free student version of S+.


www.insightful.com/downloads/libraries	(S+Resample)
www.insightful.com/Hesterberg/bootstrap	(has link to the student version)

For the missing values, consider the S+Missing library, which offers multiple imputation. With S+, do


Tim Hesterberg

P.S. The combination of sampling by subject and stratified sampling was terribly messy to program. If I'd known in advance how messy, I never would have done it :-( But it is done now.

>Dear R users,
>I have a question regarding stratified bootstrap question and how to implement
>it using boot() in R's boot package.
>My dataset is a longitudinal dataset (3 measurements per person at year
>1, 4 and 7) composed of multiple clinic centers and multiple participants
>within each clinic. It has missing values.
>I want to do a bootstrap to find the standard errors and confidence
>intervals for my variance components. My model is a mixed model with
>random clinic and random participant within clinic.
>I thought two methods to do bootstrap:
>(1) bootstrap data; however, I have problem specifying the second
>parameter for my statistic function, shall I use indices, weight or
>frequency and how shall I relate to my dataset.
>(2) bootstrap residuals; however, the dataset has multiple measurements
>and missing values. I am wondering how to construct a new data frame
>containing the residuals and fitted values.
>Any ideas will be highly appreciated!
>Sincerely yours,

| Tim Hesterberg       Research Scientist              |
| timh@insightful.com  Insightful Corp.                |
| (206)802-2319        1700 Westlake Ave. N, Suite 500 |
| (206)283-8691 (fax)  Seattle, WA 98109-3044, U.S.A.  |
|                      www.insightful.com/Hesterberg   |
Download the S+Resample library from www.insightful.com/downloads/libraries

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 Received on Thu Mar 31 03:19:12 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:57 EST