Calculate Theil's U index of inequality.
a numeric vector with the actual observed values.
a numeric vector containing the predictions.
defining the type of Theil's two U measures, see Details. Default is 2.
logical, indicating whether
Theil proposed two error measures, but at different times and under the same symbol U, which has caused some confusion.
type = 1 is taken from Theil (1958, pp. 31-42). The argument
a represents the actual observations and
p the corresponding predictions. He left it open whether
p should be used as absolute values or as observed and predicted changes.
Theil (1966, chapter 2) proposed U
type = 2 as a measure of forecast quality: "...where A_i and P_i stand for a pair of predicted and observed changes. ..."
As U_1 has some serious disadvantages (see Bliemel 1973) it is recommended to use U_2.
Andri Signorell <firstname.lastname@example.org>
Theil, H. (1958): Economic Forecasts and Policy. Amsterdam: North Holland.
Thiel, H. (1966): Applied Economic Forecasting. Chicago: Rand McNally.
Bliemel, F. (1973): Theil's Forecast Accuracy Coefficient: A Clarification, Journal of Marketing Research Vol. 10, No. 4 (Nov., 1973), pp. 444-446
 0.07512486  0.1611646
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.