Skip to contents

Plain truncation loses weighted mass and biases any population total downwards. Potter's redistribution step returns the removed mass to the untrimmed units in proportion to their own weights, preserving the total exactly. Redistribution can lift a unit above the threshold, so cap-and-redistribute is iterated until none exceeds it.

Usage

Trimit(y, weights, threshold)

Arguments

y

Numeric observations, used to report the effect on the weighted mean.

weights

Non-negative design weights of the same length.

threshold

Maximum permitted weight; must be at least the mean weight or no feasible redistribution exists.

Value

List with estimate (weighted mean after trimming), mean_before, weights, n_trimmed, iterations, sumw, max_weight, deff_before, deff_after, n, method.

Details

Formula: w_i' = min(w_i, w_max), then sum_i (w_i - w_i') is spread over the untrimmed units in proportion to w_i'; repeat.

References

Potter, F. J. (1990). A study of procedures to identify and trim extreme sampling weights. Proceedings of the Section on Survey Research Methods, American Statistical Association, 225-230.

Examples

Trimit(c(1, 2, 3, 4), c(1, 1, 1, 9), 4)
#> $estimate
#> [1] 2.666667
#> 
#> $mean_before
#> [1] 3.5
#> 
#> $weights
#> [1] 2.666667 2.666667 2.666667 4.000000
#> 
#> $n_trimmed
#> [1] 1
#> 
#> $iterations
#> [1] 1
#> 
#> $sumw
#> [1] 12
#> 
#> $max_weight
#> [1] 4
#> 
#> $deff_before
#> [1] 2.333333
#> 
#> $deff_after
#> [1] 1.037037
#> 
#> $n
#> [1] 4
#> 
#> $method
#> [1] "cap at w_max then redistribute the excess [Potter 1990]"
#>