bst: Bootstrap Confidence Intervals.

View source: R/descriptive_functions.R

bstR 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")

pubh documentation built on Oct. 8, 2024, 9:08 a.m.