I have attached a program for bootstrapping rows of data. I hope that it helps.
Kyle
#### PROGRAM - samplerows.SSC
#### This is a program to sample rows of data
#### rather than just single data points from one var.
#### First, let's suppose a matrix like the following
mat<-rbind(c(1,2,3),c(4,5,6),c(7,8,9))
mat
#### Next we will determine the number of people to
#### sample from the above dataset
n.people<-2
#### Here we will create a matrix called data.index
#### that will be the variable from which we will
#### sample from the original dataset. data.index
#### will be a vector of numbers the length of which #### is the number of
people in n.people
#### which has random numbers corresponding to the
#### rows of the original dataset.
data.index<-matrix(sample(nrow(mat), size=n.people, replace=T))
data.index
output<-mat[data.index,]
output
*****************************************************
J. Kyle Roberts, Ph.D.
Assistant Professor of Educational Research
University of North Texas
P.O.Box 311335
Denton, TX 76203-1335
voice - 940-369-7168
fax - 940-565-2185
kroberts@unt.edu
*****************************************************
>>> "H. Lester Kirchner" <hlk2@case.edu> 04/13/04 12:18 PM >>>
I am interested in generating CIs for the intraclass correlation coefficient
via the bootstrap. The data I have is small and think the bootstrap is a
good way to approach this. I have used the bootstrap function in Splus
before, but not with data that has multiple measurements on the same unit.
Does anyone have any code or could point me in the right direction?
I am using Splus v6.1 on Windows.
Thanks for any help.
Les
----------------------------------------
H. Lester Kirchner, Ph.D.
Assistant Professor
Case Western Reserve University
Rainbow Babies & Children's Hospital
Division of Clinical Epidemiology
11100 Euclid Ave., MS: 6003
Cleveland, OH 44106-6003
Phone: 216-844-6219
Fax: 216-844-6265
email: Lester-Kirchner@case.edu
The enclosed information is STRICTLY CONFIDENTIAL and is intended for the use
of the addressee only. University Hospitals Health System and its affiliates
disclaim any responsibility for unauthorized disclosure of this information to
anyone other than the addressee.
Federal and Ohio law protect patient medical information disclosed in this
email, including psychiatric disorders, (HIV) test results, AIDs-related
conditions, alcohol, and/or drug dependence or abuse. Federal regulation (42
CFR Part 2) and Ohio Revised Code section 5122.31 and 3701.243 prohibit
disclosure of this information without the specific written consent of the
person to whom it pertains, or as otherwise permitted by law.
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu. To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message: unsubscribe s-news
|