pubh (version 1.1.16)

bst: 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

Run this code
# NOT RUN {
data(IgM, package = "ISwR")
bst(IgM, "median")

bst(IgM, "gmean")
# }

Run the code above in your browser using DataCamp Workspace