Skip to contents

Returns a named list with summary statistics, Kish ESS, design effect, weight-range ratio, and percentile vector.

Usage

morie_weights_diagnostics(weights)

Arguments

weights

Numeric vector of unit-level design weights.

Value

A named list (see Details).

Examples

set.seed(1)
morie_weights_diagnostics(runif(30, 0.5, 2))
#> $n
#> [1] 30
#> 
#> $sum_weights
#> [1] 37.92986
#> 
#> $mean_weight
#> [1] 1.264329
#> 
#> $median_weight
#> [1] 1.16286
#> 
#> $std_weight
#> [1] 0.44292
#> 
#> $min_weight
#> [1] 0.5200855
#> 
#> $max_weight
#> [1] 1.987859
#> 
#> $cv
#> [1] 0.3503204
#> 
#> $effective_sample_size
#> [1] 26.81843
#> 
#> $design_effect
#> [1] 1.118634
#> 
#> $weight_range_ratio
#> [1] 3.822178
#> 
#> $n_zero
#> [1] 0
#> 
#> $n_negative
#> [1] 0
#> 
#> $percentiles
#>        1%        5%       10%       25%       50%       75%       90%       95% 
#> 0.5411377 0.6357234 0.7571849 0.8989050 1.1628600 1.6351785 1.8662863 1.9102831 
#>       99% 
#> 1.9673137 
#>