capWeight: Apply an exponent function if value beyond max threshold

Description Usage Arguments Value Author(s) See Also Examples

Description

This function adjusts the size of values in a numeric vector once value go beyond a certain threshold. The adjustment is done by an exponential function with the default exponent 0.7. In the context of business tendency surveys this function is often used to lower the influence of very large companies when employment based weighting is used.

Usage

1
  capWeight(weight, threshold = 500, exponent = 0.7)

Arguments

weight

input numeric vector

threshold

input numeric giving the threshold beyond which exp function should be applied

exponent

input numeric giving the exponent, typically below one as influence of big weights should be declined

Value

numeric vector of capped weights

Author(s)

Matthias Bannert

See Also

setSizeClass

Examples

1
2
3
4
5
6
# vector of weights
weights <- c(1001,2,3,400,5,700,9,1,800,79223)
# weights below the thresholds are not affected
# by capWeight
capWeight(weights)
#

mbannert/gateveys documentation built on May 21, 2019, 2:23 p.m.