Learn R Programming

valueprhr (version 0.1.0)

robust_summary: Robust Summary Statistics with Bootstrap Confidence Intervals

Description

Computes mean, standard deviation, median, MAD, trimmed mean, and bootstrap confidence intervals for a numeric vector.

Usage

robust_summary(x, bootstrap_reps = 200L, trim_proportion = 0.1)

Value

A list containing:

mean

Arithmetic mean

sd

Standard deviation

median

Median

mad

Median Absolute Deviation (scaled)

tmean

Trimmed mean

ci

Vector of length 2 with 95 percent bootstrap CI bounds

Arguments

x

Numeric vector.

bootstrap_reps

Number of bootstrap replications for CI. Default 200.

trim_proportion

Proportion to trim for trimmed mean. Default 0.10.

Examples

Run this code
set.seed(123)
x <- rnorm(50)
robust_summary(x)

Run the code above in your browser using DataLab