Learn R Programming

aggutils (version 1.0.2)

hd_trim: Highest-Density Trimmed Mean

Description

From Powell et al. (2022) 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)

Value

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

Arguments

x

Vector of forecasts in 0 to 100 range (%)

p

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