bst {pubh} | R Documentation |
Bootstrap Confidence Intervals.
Description
bst
estimates confidence intervals around the mean
, median
or geo_mean
.
Usage
bst(x, stat = "mean", n = 1000, CI = 95, digits = 2)
Arguments
x |
A numerical variable. Missing observations are removed by default. |
stat |
Statistic, either "mean" (default), "median" or "gmean" (geometric mean). |
n |
Number of replicates for the bootstrap (n=1000 by default). |
CI |
Confidence intervals (CI=95 by default). |
digits |
Number of digits for rounding (default = 2). |
Value
A data frame with the estimate and confidence intervals.
Examples
data(IgM, package = "ISwR")
bst(IgM, "median")
bst(IgM, "gmean")
[Package pubh version 1.3.2 Index]