hd_trim: Highest-Density Trimmed Mean

View source: R/agg.R

hd_trimR Documentation

Highest-Density Trimmed Mean

Description

From Powell et al. (2022) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1037/dec0000191")}. You find the shortest interval containing (1-p) * 100% of the data and take the mean of the forecasts within that interval.

Usage

hd_trim(x, p = 0.1)

Arguments

x

Vector of forecasts in 0 to 100 range (%)

p

The proportion of forecasts to trim (between 0 and 1)

Value

(numeric) The highest-density trimmed mean of the vector

Note

As p gets bigger this acts like a mode in a similar way to the symmetrically-trimmed mean acting like a median.


aggutils documentation built on Aug. 23, 2023, 1:09 a.m.

Related to hd_trim in aggutils...