I have a time series of data with N=14 counts at each time point, and I want to calculate the Gini coefficient and a standard error for this estimate at each time point.
Since I have only N=14 counts at each time point I proceeded by calculating the jackknife variance, i.e. $\operatorname{var}(G) = \frac{n-1}{n} \times \sum_{k=1}^n (G(n,k)-\bar{G}(n))^2$ from equation 7 of Tomson Ogwang 'A convenient method of computing the Gini index and its' standard error'. Where $G(n,k)$ is the Gini coefficient of the N values without element $k$ and $\bar{G}(x)$ is the mean of the $G(n,k)$.
Direct naive implementation of the above formula for Variance.
calc.Gini.variance <- function(x) {
N <- length(x)
# using jacknifing as suggested by Tomson Ogwang - equation 7
# in the Oxford Bulletin of Economics and Statistics, 62, 1 (2000)
# ((n-1)/n) \times \sum_{k=1}^n (G(n,k)-\bar{G}(n))^2
gini.bar <- Gini(x)
gini.tmp <- vector(mode='numeric', length=N)
for (k in 1:N) {
gini.tmp[k] <- Gini(x[-k])
}
gini.bar <- mean(gini.tmp)
sum((gini.tmp-gini.bar)^2)*(N-1)/N
}
calc.Gini.variance(c(1,2,2,3,4,99))
# [1] 0.1696173
Gini(c(1,2,2,3,4,99))
# [1] 0.7462462
Is this a reasonable approach for a small N? Any other suggestions?