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]] > > ______________________________________________ > [email protected] 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 ______________________________________________ [email protected] 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.
