mik*_*ike 4 bootstrapping r confidence-interval
我是新用户,使用启动包时遇到问题.我想做的就是使用自举来产生数字向量的均值周围的置信区间,例如:
x <- rnorm(100, 1, .5)
Run Code Online (Sandbox Code Playgroud)
有小费吗?
Vin*_*ynd 11
以下不够吗?
library(boot)
x <- rnorm(100, 1, .5)
b <- boot(x, function(u,i) mean(u[i]), R = 999)
boot.ci(b, type = c("norm", "basic", "perc"))
Run Code Online (Sandbox Code Playgroud)