[R] Bootstrap

Wu Gong wg2f at mtmail.mtsu.edu
Sun Aug 8 19:35:00 CEST 2010


Hi,

I assume you used boot package. Try this:

library(boot)
x <- rnorm(136)
fun <- function(x,ind){
	x <- x[ind]
	m <- mean(x[63:136])-mean(x[1:62])
	m
	}
boot.x<- boot(x, fun, R = 5000, sim = "ordinary")



-----
A R learner.
-- 
View this message in context: http://r.789695.n4.nabble.com/Bootstrap-tp2317776p2317860.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list