TrimmingIndicator: Trimming indicator

Description Usage Arguments Value Examples

View source: R/util-func.R

Description

This returns an integer vector whose i-th element takes 1L if the i-th element of x lies between f*100 and (1-f)*100 -th percentiles, i.e., an interior point, and 0L otherwise.

Usage

1

Arguments

x

a numeric vector or matrix.

f

a numeric number that indicates the cut-off percentile level.

Value

an integer vector consisting only of ones and zeros.

If x is a matrix, interior points are searched on each column, and the element-wise product of the trimming indicators of the columns are returned.

Examples

1
2
3
4
5
n <- 500L
x <- rnorm(n)
f <- 0.025

trimming <- TrimmingIndicator(x, f)

henrykye/semiBRM documentation built on Dec. 20, 2021, 3:49 p.m.