- One-Sample Mean
res <- bootInterval(x) # 95% bootstrap intervals based on 1000 bootstrap samples
check(res) # check normality of bootstrap samples
summary(res) # 95% bootstrap percentile confidence intervals
# If normality holds then can do
summary(res, "t") # 95% bootstrap t confidence intervals
summary(res, "both") # both percentil and t intervals
summary(res, "b") # same as the above
res < bootInterval(x, conf.level=0.90) # 90% confidence interval(s)
res < bootInterval(x, B=2000) # bootstrap size is 2000
- One-Sample Variance
res <- bootInterval(x,par="variance") # for variance
res <- bootInterval(x,par="v") # same as the above
res <- bootInterval(x,par="variance",log=T) # for log(variance)
- One-Sample Proportion
res <- bootInterval(x,par="proportion") # for proportion
res <- bootInterval(x,par="p") # same as the above
- Difference in Two-Sample Means
res <- bootInterval(x,y) # for mu1 - mu2
# Note: bootstrap percentile confidence intervals only
- Ratio of Two-Sample Variances
res <- bootInterval(x,y,par="v",comp="r") # for sigma1^2 / sigma2^2
res <- bootInterval(x,y,par="v",comp="r",log=T) # for log(sigma1^2 / sigma2^2)
- Two-Sample Proportions (using summary statistics)
# Summary statistics are
# sample 1: 120 out of 200, sample 2: 73 out of 100
res <- bootInterval(120,73,200,100,par="p",comp="d") # for p1 - p2
res <- bootInterval(120,73,200,100,par="p",comp="r") # for p1 / p2
res <- bootInterval(120,73,200,100,par="p",comp="r",log=T) # for log(p1) - log(p2)
- Paired-Sample for Means
res <- bootInterval(x,y,paired=T)