[R] about bootstrapping

Chuck Cleland ccleland at optonline.net
Wed Mar 14 09:39:48 CET 2007


Ray Cheung wrote:
> Dear All,
> 
> I've a 10 by 5 data frame like this
> 
> set.seed(1001)
> a <- rnorm(10)
> b <- rnorm(10)
> c <- rnorm(10)
> d <- rnorm(10)
> e <- rnorm(10)
> A <- cbind(a,b,c,d,e)
> 
> Each row is one datum. I want to resample within A[,5]. Fit the regression
> lines lm(A[,5] ~ A[,1] + A[,2]) and lm(A[,5] ~ A[,3] + A[,4]) to each
> bootstrap sample. I don't know how to write the statistics part. Can anybody
> help me? Thank you very much.

  You might have a look at John Fox's Appendix to An R and S-PLUS
Companion to Applied Regression on this topic:

http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-bootstrapping.pdf

> Regards,
> 
> Ray
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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. 

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894



More information about the R-help mailing list