Theil's Inequality Coefficient U1
Arguments
- vintages.view
mts object. Vertical or diagonal view of the
create_vintages()
output- gap
Integer. Gap to consider between each vintages. Default is 1 which means that revisions are calculated and tested for each vintages consecutively.
- na.zero
Boolean whether missing values should be considered as 0 or rather as data not (yet) available (the default).
Examples
## Simulated data
df_long <- simulate_long(
n_period = 10L * 4L,
n_revision = 5L,
periodicity = 4L,
start_period = as.Date("2010-01-01")
)
## Create vintage and test
vintages <- create_vintages(df_long, periodicity = 4)
theil(vintages$diagonal_view)
#> [1] 0.043990257 0.025763456 0.024042038 0.007585347