View source: R/inequalityMeasure.R
Theil_T | R Documentation |
Computes Theil_T
inequality measure of a given variable taking into account weights.
Theil_T(X, W = rep(1, length(X)))
X |
is a data vector |
W |
is a vector of weights |
Theil T index is defined as:
T_{T} = T_{\alpha=1} = \frac{1}{N} \sum_{i=1}^N \frac{ x_{i} }{\mu} ln \big( \frac{ x_{i} }{\mu} \big)
where
\mu = \frac{1}{N} \sum_{i=1}^N x_{i}
The value of Theil_T
coefficient.
Serebrenik A., van den Brand M.: Theil index for aggregation of software metrics values. 26th IEEE International Conference on Software Maintenance. IEEE Computer Society.
Conceição P., Ferreira P.: (2000) The Young Person’s Guide to the Theil Index: Suggesting Intuitive Interpretations and Exploring Analytical Applications
OECD: (2020) Regions and Cities at a Glance 2020, Chapter: Indexes and estimation techniques
# Compare weighted and unweighted result
X=1:10
W=1:10
Theil_T(X)
Theil_T(X,W)
data(Tourism)
# Theil T coefficient for Total expenditure with sample weights
X=Tourism$`Total expenditure`
W=Tourism$`Sample weight`
Theil_T(X,W)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.