Skip to contents

Given a vector of weights and welfare, this functions computes the Mean Log Deviation (MLD).

Usage

md_compute_mld(welfare, weight, mean = NULL)

Arguments

welfare

numeric: A vector of income or consumption values

weight

numeric: A vector of population weights, optional, a vector of 1s if not specified.

mean

numeric: A value with the mean. Optional.

Value

numeric

Examples

wbpip:::md_compute_mld(welfare = 1:2000, weight = rep(1, 2000))
#> [1] 0.304993