text:
The siege of Wark is a 1138 siege of Wark on Tweed Castle (Wark castle) conducted from May–November by Scottish forces under David I against the defending English garrison. The siege was part of a campaign launched by David in support of his niece, the Empress Matilda, and her claim to the English throne over that of Stephen of Blois who had seized the throne in 1135. The invasion followed a similar campaign in 1136 when David had succeeded in gaining control of Cumberland, and raids launched in 1137 and earlier in 1138.

Despite David's defeat at the battle of the Standard in August 1138, the siege continued and the castle fell in November after the abbot of Rievaulx negotiated a surrender allowing the starved defenders to leave honourably with their arms. The fall of Wark contributed to Stephen being forced to cede control of Northumberland to David in 1139. Cumberland and Northumberland would both remain under Scottish control until after David's death in 1153.

Background

Anglo-Scottish relations

While Henry I ruled England relations between the England and Scotland had been peaceful. David I of Scotland had a good personal relationship with Henry and fully supported Henry's intention to have his daughter, the Empress Matilda, named as his heir. David was Matilda's maternal uncle and would become one of her most powerful supporters. Following Henry's death in 1135 his nephew, Stephen of Blois, seized the throne. David responded by seizing Cumberland and Northumberland.

A treaty was signed in February 1136 by which David retained Cumberland, relinquished lands in Northumberland, and had his son, another Henry, recognised as lord of Huntingdon, for which he did homage to Stephen. Stephen also promised to address Henry's claim to Northumberland. The peace did not last and in 1137 and early 1138, David had launched raids into England planned to coincide with rebellions in southern England by Matilda's supporters. Wark was besieged during this time for three weeks, starting on 10 January. After this, David let loose his army to raid and pillage through Northumberland, before being driven back by the English under Count Waleran by mid February. Stephen responded in kind with a raid upon coastal Lothian. In contrast to the campaigns of 1136 and 1137, no attempt was made to contact David or attempt diplomacy. Stephen then returned to England so abruptly that the chronicler John of Hexham speculated he may have doubted the loyalty of some within his army.

English rebellion

After Easter 1138 there was a series of rebellions against Stephen across the west of England, with the key defector being Robert of Gloucester, who renounced his fealty to Stephen and declared his support for Matilda's claim to the throne. One defector was Eustace fitz John who reached David as the King was again raiding into England. Eustace's brother, William fitz John, joined Robert's southern campaign, providing a link between the two forces. The Gesta Stephani mentions a letter sent by Matilda to David seeking his support. David responded by reopening his campaign in Northumberland on 8 April. David's army had retreated to Roxburgh while Stephen raided Lothian and now crossed the border with the intention of devastating coastal Northumberland and County Durham.

Siege

Siege begins
The siege began in May 1138 after David's attention was drawn by the garrison of Wark raiding the Scottish supply lines. This was the only known raid by a castle garrison behind enemy lines in the Scottish invasions of England of 1138 and 1173-1174, and it succeeded in taking hostages for ransom. Richard of Hexham, the closest chronicler, reports that the initial phase of the siege was a sharp fight, with the Scottish employing battering rams and other siege engines. Casualties were high among the attackers, and David left in search of a more decisive victory. Two barons were assigned to continue the blockade of the castle. It was during this time that Eustace fitz John joined David and pushed for the king to assault Bamburgh castle, custody of which Eustace had lost earlier in the year. David instead chose to march south, perhaps intending to put pressure on Stephen.

Wider campaign
David's army marched south, bypassing Durham and entering Yorkshire at the end of July. The Scots were stopped at Northallerton where they were defeated at the battle of the Standard by an English army assembled by Thurstan, Archbishop of York, on the 22 August. Stephen's issues in the South prevented him from following up on this victory, allowing David to reform his army at Carlisle. While at Carlisle, and by late September, David met the papal legate, Alberic, Bishop of Ostia who negotiated a truce between Scotland and England, whereby the Scots returned all the women who had been carried off during the campaign and it was agreed that they would not attack England again before 11 November 1139. Wark castle was explicitly exempted from these terms, allowing David to continue the siege.

Siege ends
After the battle of the Standard David returned to Wark. Townsmen joined the garrison in the defence, with much of the Scottish siege equipment being destroyed during a sally by the defenders. David continued to blockade the castle, starving the defenders. In November the abbot of Rievaulx negotiated a surrender allowing the defenders to leave honourably with their arms.

Aftermath
David ordered the castle destroyed after it fell. Possession of Wark castle, along with Norham castle, which fell after a short siege, and Alnwick castle, which Eustace fitz John handed over to the Scots, put David in a strong position in the subsequent negotiations, despite his defeat at Northallerton. The Treaty of Durham was signed on the 9 April 1139, wherein Stephen was forced to cede Northumberland to David's control, along with continued enjoyment of the honour of Huntingdon. Despite warfare being renewed in 1141 David would hold on to the provinces of Northumberland and Cumberland, integrating them into Scotland, with Carlisle becoming the usual seat of David's government; he died there in May 1153. Contemporary English writers criticised David for the atrocities committed by his followers during the invasions of 1137 and 1138, but William of Newburgh gives him credit for enforcing peace in Northern England at a time it was conspicuously absent in the south.

The conquest of Northumberland and Cumberland added significantly to the resources available to the Scottish crown, with David being able to use the silver mines of Alston near Carlisle to mint the first native coinage of Scotland and underwrite his programme of monastic foundation.

David's son Henry predeceased David in 1152, leaving Henry's son, the 12-year-old Malcolm IV, to take the throne upon David's death in 1153. Without a mature adult on the throne of Scotland, Northumberland and Cumberland were lost within four years of David's death, beginning nearly a century of struggle for their reclamation.

References

Sources

Wark
Wark
Wark
Wark
Wark
Wark

redpajama_set_name: RedPajamaWikipedia


text:
\section{Introduction}
The estimation of income Inequality Measures (IM) in small samples can face several issues  related to bias and non-robustness to outliers. First of all, those measure are known to be  biased in small samples \cite{Deltas2003} \cite{Breunig2008}, leading usually to an underestimation of inequality. The amount of bias, generally negative, depends on the magnitude of the coefficient of variation of the underlying distribution of the variable of interest and, for some specific measures, it also depends on its skewness \cite{breunig2001almost}. Consider that income is well-known to be positively skewed. Moreover, the magnitude of the bias varies depending on the inequality measure. This aspect deserves attention given that inequality measures values are used for comparisons across time and location. Neglecting the bias may bring out discrepancies in estimated quantities due to different sample sizes or different amounts of distribution skewness rather than be true inequality differences \cite{Breunig2008}. As regards Gini index bias, a rich literature faces it such as \cite{jasso1979gini}, \cite{lerman1989improving},  \cite{Deltas2003}, \cite{Davidson2009}, \cite{van2011simple} in i.i.d. samples and \cite{fabrizi2016small} for the complex survey case. However, concerning alternative measures such as Atkinson Indexes and the Generalized Entropy (GE) measures, literature on bias is very scarce even in i.i.d. case. Some contributions are provided by \cite{Giles2005} and \cite{Schluter2009} for GE measures and \cite{Breunig2008} for GE measures and Atkinson Indexes. The mentioned references adopt different methodological approaches to correct or reduce bias in a i.i.d. context.
However, income data are usually collected via specific household survey with a complex sampling design, based on stratification of the survey population and on selection of sampling units in more than one stages. Thus, survey sample selection process, together with ex-post treatment procedures such as calibration and imputation, invariably introduces a complex correlation structure in the data, which has to be taken into account and it makes the development of a theoretically valid bias correction challenging.

Furthermore, the issues related to non-robustness to outliers of inequality measures are widely explained by \cite{cowell1996robustness}. The non-robustness issue is even exacerbated in income data applications, which are traditionally affected by the extreme values problem, see \cite{van2007extreme}.  It has been widely tested that, generally, those measures appear to be unrobust even to an infinitesimal amount of data contamination, especially when dealing with extreme values on the tails. This unrobustness depends clearly on the type of measure we are dealing with and it becomes even more cumbersome to handle in case of small samples. Moreover, the presence of extreme values can increase the bias.
The inequality measures considered here are Gini Index, Atkinson Index and Generalized Entropy measures, together with the Coefficient of Variation measure.

The aim of this paper is twofold. On one hand, we provide a comprehensive discussion about the behavior of inequality estimators in small samples from complex surveys, including issues generally addressed in a piecemeal manner, such as bias evaluation, robustness, variance estimation and distributional analysis. This analysis could be very useful for future developments of inference strategies on such measures in the context of small samples inference, where classical asymptotic results do not hold, above all in the field of small domain estimation. On the other hand, the aim is to propose a methodological framework for bias-correction in a finite population setting, more specifically taking into account complex survey designs.
The methodology is based on Taylor's expansions, where the estimation of design-based estimator variances and covariances has been performed via the generalized linearization method,
 \cite{deville1999variance} and \cite{demnati2004linearization}, relying on the concept of influence functions.
Any parametric assumptions on the income distribution is not required, providing a very flexible framework applicable to any income distributional assumption.

Our bias-correction proposal has been evaluated via simulations showing a noticeable bias reduction for all the measures and leading in some cases to approximate unbiased estimators. An in-depth analysis on the most sensitive measures confirms the great impact outliers have on the magnitude of estimators bias and variance.

A preliminary definition of the considered inequality measure can be found in Section \ref{ineqmeasures}. The bias-correction strategy is set out in Section \ref{biasresults} and the bias-correction estimation steps are detailed in Section \ref{biasest}. A design-based simulation study involving European Survey of Income and Living Condition (EU-SILC) income data \cite{clemenceau2007eu} is provided in Section \ref{simulationsection}, in order to evaluate bias-correction and sensitivity to extreme values. A design-aware bootstrap for bias-corrected estimators variance is proposed in Section \ref{bcvariance}, while a distributional analysis involving an additional model-based simulation follows in Section  \ref{bcdistribution}.  Conclusions are drawn in Section \ref{conclusions}.

\section{Inequality Measures}
\label{ineqmeasures}

The most famous inequality measure is, indeed, the Gini concentration index,
employed in social sciences for measuring concentration in the distribution of a positive random variable. There are several equivalent definitions of Gini index \cite{ceriani2015individual}, we will use the formulation of \cite{sen1973economic} as follows. Suppose we have a finite population $\mathcal{U}$ of $N (< \infty)$ elements labeled as $\lbrace 1, \dots, N \rbrace$. Let $y_i$ be a characteristic of interest, in our case income, for the $i$-th unit of the finite population,  where $y_i \in R^+$, $\forall i = 1, \dots ,N$,
\begin{align*}
G=\frac{1}{N^2\mu} \sum_{i} N_i y_i -\frac{N+1}{N},
\end{align*}
with $N_i$ denoting the rank of the $i$-th unit and $\mu$ the expected value of income variable.

The estimation of alternative measures, as opposed to Gini index, may enable a more meaningful assessments of different aspects of economic inequality. Gini does not allow to decompose inequality into within groups and between groups components, moreover it is positional (weakly) transfer sensitive, namely variations in the index depends on the ranks of the donor and recipients. And lastly Gini constitutes itself as a stochastic dominance measure, based on partial ordering of probability distributions: two very different distributions - one having more inequality amongst the poor, the other amongst the rich can have exactly the same Gini Index value.
When the distributional dominance fails, welfare-based measures such as Atkinson Indexes, may provide for a \emph{complete} ranking among alternative distributions, at the expense of more stringent assumptions as to how to represent social welfare, leading to weaker outcome robustness \cite{bellu2006describing}. Furthermore, these measures satisfy the additive decomposability axiom.
Atkinson index has support [0,1] and
is defined as
\begin{align*}
{\displaystyle A(\varepsilon)={\begin{cases}1-{\frac {1}{\mu }}\left({\frac {1}{N}}\sum _i y_{i}^{1-\varepsilon }\right)^{1/(1-\varepsilon )}&{\mbox{for}}\  \varepsilon \neq 1\\1-{\frac {1}{\mu }}\left(\prod _i y_i\right)^{1/N}&{\mbox{for}}\ \varepsilon =1.\end{cases}}}
\end{align*}
 The parameter $\varepsilon$ expresses the level of inequality aversion, as $\varepsilon$ increases, the index  becomes more sensitive to changes at the lower end of the income distribution.

 Another decomposable family of inequality measure is the Generalized Entropy class. As opposed to the measures seen before, this class has the advantages to be strongly transfer sensitive, meaning that it react to transfers depending on donor and recipient income levels. It is based on the concept of entropy which applied to income distributions has the meaning of deviations from perfect equality:
\begin{align*}
 GE(\alpha )={\begin{cases}{\frac  {1}{N\alpha (\alpha -1)}}\sum_i \left[\left({\frac  {y_{i}}{\mu}}\right)^{\alpha }-1\right]&\alpha \neq 0,1,\\{\frac  {1}{N}}\sum _i{\frac  {y_{{i}}}{\mu}}\ln {\frac  {y_{{i}}}{\mu}}&\alpha \rightarrow1,\\-{\frac  {1}{N}}\sum_i\ln {\frac  {y_{{i}}}{\mu}}&\alpha \rightarrow 0.\end{cases}}
\end{align*}
with $\alpha$ capturing the sensitivity of the index to a specific part of the income distribution,  a large $\alpha$ let the index be more sensitive to the upper tail, vice versa a small $\alpha$ to the lower tail. $GE(0)$ is the Mean Log Deviation, while $GE(1)$ is the more famous Theil index. Atkinson and Generalized Entropy are two interrelated parametric families of measures, as a transformation of the Atkinson Index is a member of the GE class:
\begin{align*}
A(\varepsilon)=1-[\varepsilon(\varepsilon-1)\cdot \text{GE}(1-\varepsilon)+1]^{1/(1-\varepsilon)}.
\end{align*}
In this paper, we will consider the estimation of both classes separately since common parameter values used in one family does not correspond deterministically to common parameter values used in the other one.
Lastly, we consider as inequality measure the Coefficient of Variation defined in population as $CV=\sqrt{Var(y)}/\mu$. Its square has been used in some income distribution analyses, including \cite{organisation2011divided}, but comparisons developed using this measure seems to be very sensitive to top outliers  \cite{Atkinson2015}.

\section{Estimators Bias-Correction Proposal}
\label{biasresults}

The bias of the IM estimators in small samples drawn through a complex design can be due to the structure of IM as non linear function of unbiased (or sometimes even biased) estimators, leading them to be biased.  The bias can be either positive or negative, depending on the characteristics of the reference variable distribution, except for the Mean Log Deviation ($GE(\alpha=0)$) which has structurally negative bias; this aspect is made clearer in the following. Among the measures with not predictable bias direction,  \cite{breunig2001almost} shows that $CV$ and $GE(2)$ bias direction is negatively related with skewness. As regards the other measures, it depends on the magnitude of the coefficient of variation related to the income variable and to a monotonic transformation of it.  This aspect could be analyzed in-depth by imposing a distributional assumption on the income variable, however this is out of scope.

\begin{proposition}
As stated by \cite{Breunig2008}, for a subset of the considered measures, i.e. the ones pertaining to GE and Atkinson families,  the relationship between the expectation of the sample measure of inequality $\hat{\theta}$ and its true population value $\theta$ is:
 \begin{align} \EX(\hat{\theta})=\theta+O_p\bigg(\frac{1}{n_{iid}}\bigg),
  \end{align}
  with $n_{iid}$ denoting the sample size in the i.i.d. case.
\label{prop1}
\end{proposition}

\begin{proof}
Let us consider a sample with i.i.d. elements $\lbrace y_1, \dots, y_{n_{iid}} \rbrace$, drawn from a population via simple random sampling, where $y_i$ is the variable for the $i$-th unit with expected value $\mu$ and variance $\sigma^2$. Let us consider also $\lbrace g(y_1), \dots, g(y_{n_{iid}}) \rbrace$ with $g(\cdot)$ defined a generic function $g : \mathbb{R}^+ \rightarrow \mathbb{R}$ that changes for each measure, having expected value $\gamma$.
 Considering equation (\ref{genericf}) with $\hat{\mu}=\sum_{i=1}^{n_{iid}} y_i/n_{iid}$ and $\hat{\gamma}=\sum_{i=1}^{n_{iid}} g(y_i)/n_{iid}$, we can easily obtain estimator moments as $\hat{\mu} \sim [\mu, \sigma^2/n_{iid}]$ and $\hat{\gamma} \sim [\gamma, \phi^2/n_{iid}]$. Let us consider moreover that
 \begin{align}
Cov(\hat{\mu},\hat{\gamma})=\EX(\hat{\mu} \hat{\gamma})-\mu\gamma= \frac{1}{n_{iid}}  (\EX(y \cdot g(y))-\mu\gamma)=\frac{Cov(y, g(y))}{n_{iid}}.
\end{align}
 By expanding the inequality measure estimator $\hat{\theta}$ as a function of $\hat{\mu}$ and $\hat{\gamma}$ via Taylor's expansion around the population values and considering its expected value:
 \begin{align}
\EX(\hat{\theta})&=\theta+\frac{1}{2}f_{\gamma, \gamma}(\gamma, \mu) V(\hat{\gamma})+f_{\gamma, \mu}(\gamma, \mu) Cov(\hat{\gamma}, \hat{\mu})+ \frac{1}{2} f_{\mu, \mu}(\gamma, \mu)V(\hat{\mu})+O_p(n_{iid}^{-2})\nonumber\\
&=\theta+O_p(n_{iid}^{-1})+O_p(n_{iid}^{-1})+O_p(n_{iid}^{-1})+O_p(n_{iid}^{-2})\nonumber\\
&=\theta+O_p(n_{iid}^{-1}),
\label{proofprop1}
\end{align}
where $f_{\gamma}=\frac{\partial f(\gamma, \mu)}{\partial \gamma}$ and $f_{\gamma\mu}=\frac{\partial^2 f(\gamma, \mu)}{\partial \gamma \partial \mu}$.
\end{proof}

Our bias-correction proposal constitutes as a generalization of the framework of \cite{Breunig2008}, developed for i.i.d. observations, to the finite population and full design-based setting. At the same time, we extend the proposal to a wider set of measures comprising Gini Index. We provide a closed-form bias correction for complex designs which permits to avoid the use of resampling techniques and it can be applied in a distribution-free setting at once. This generalization has been developed considering Horwitz-Thompson type design-based estimator, Ultimate Clusters technique and Influence Function linearization technique for the estimation of design variances and covariances.

We are interested in a variety of non linear functions of income values as IM are. Let denote $\mathcal{S}$ a sample of size $n$, drawn using a complex probability sampling design, with $p(s)=Pr(\mathcal{S}=s)$ the probability of selecting the particular sample $s \subset \mathcal{U}$, thus $p(s)\geq 0$ and $\sum_{s\in  \mathcal{S}} p(s) = 1$ .
The inclusion probability of unit $i$ is denoted with $\pi_i$ and defined such that $\pi_i= Pr(i \in \mathcal{S})$.

We consider the generic inequality measure written as a function of the mean $\mu$ and the expected value of a generic function $g(\cdot)$ which we will generically refer to as $\gamma=\EX(g(y))$. The population value for the generic inequality measure is
\begin{align}
\theta=f(\mu, \gamma),
\label{genericf}
\end{align}
with $f(\cdot)$ a twice-differentiable function.
The related estimator in our complex survey framework is
$\hat{\theta}=f(\hat{\mu}, \hat{\gamma})$
in which Horvitz-Thompson complex survey estimators of the mean and the generic component $\gamma$ are plugged in, i.e.
\begin{align}
\hat{\mu}=\frac{\sum_{i=1}^n w_i y_i}{\sum_{i=1}^n w_i}
\quad \text{and} \quad
\hat{\gamma}=\frac{\sum_{i=1}^n w_i g(y_i, w_i)}{\sum_{i=1}^n w_i}.
\label{eq1}
\end{align}
where $w_i=1/\pi_i$ or a treated and calibrated version of it. \cite{kakwani1990large}  uses a similar approach to express inequality indices in order to derive their asymptotic standard error.
 By simply applying a second order Taylor's series expansion of the sample estimator around the population values and evaluating its expected value, the bias is
\begin{align}
\EX(\hat{\theta}-\theta)=&f_{\gamma}(\gamma, \mu) \EX(\hat{\gamma}-\gamma)+\frac{1}{2}f_{\gamma, \gamma}(\gamma, \mu) [ V(\hat{\gamma})+ \EX^2(\hat{\gamma}-\gamma)]+ \nonumber \\&+f_{\gamma, \mu}(\gamma, \mu) [Cov(\hat{\gamma}, \hat{\mu})-\mu  \EX(\hat{\gamma}-\gamma)]+ \frac{1}{2} f_{\mu, \mu}(\gamma, \mu)V(\hat{\mu})+O_p(n^{-2}).
\label{bias1}
\end{align}
 Notice that $\hat{\mu}$ is unbiased and (\ref{bias1}) appears as a generalization of equation (\ref{proofprop1}) to the finite population case and by considering $\hat{\gamma}$ estimator may be biased.
\vspace{2mm}

\noindent An alternative method, dealing with IM bias in small sample, is the small-$\sigma$ approximation described in \cite{ullah2004}. However this framework  requires high order moments and cross-moments estimation when facing non i.i.d. assumptions, which results quite challenging in cases of multi-stage surveys and distribution-free setting.

So we propose approximate bias corrections for Gini Index, General Entropy, Atkinson Indexes and Coefficient of Variation based on (\ref{bias1}). In the following the corrections for the whole set of inequality measures is made explicit.

\subsection{Approximate Bias-Corrected Inequality Measures}

\begin{itemize}
\item{\textbf{Coefficient of Variation}}
\begin{align}
CV=\frac{\sqrt{\gamma-\mu^2}}{\mu}\quad \text{with} \quad \gamma=\EX(Y^2).
\end{align}
Considering that the complex survey estimator is
\begin{align}
\hat{CV}=\sqrt{\frac{n'}{n'-1} }\bigg( \frac{1}{\hat{N}} \sum_{i \in S} w_i \bigg( \frac{y_i}{\hat{\mu}} \bigg)^2-1 \bigg)^{1/2} =\sqrt{\frac{n'}{n'-1} } \frac{\sqrt{\hat{\gamma}-\hat{\mu}^2}}{\hat{\mu}},
\end{align}
with $\hat{\gamma}=\sum_{i \in S} w_i y_i^2/\sum_{i \in S} w_i $ and $\hat{\mu}$ as indicated in (\ref{eq1}), $n'$ the number of observations with weights different than zero and $\sqrt{n'/(n'-1)}$ the standard bias-correction adjustment for the weighted variance.
Consider that $\hat{\gamma}$ is unbiased.

\noindent The approximate bias in CV is:
\begin{align}
\EX[\hat{CV}]-CV \cong &\sqrt{\frac{n'}{n'-1} }\bigg[ \bigg( -\frac{1}{8\mu}(\gamma-\mu^2)^{-3/2}\bigg) V(\hat{\gamma})\nonumber\\
&- \frac{1}{2}\bigg( \mu^{-2} (\gamma-\mu^2)^{-1/2}-(\gamma-\mu^2)^{-3/2}\bigg) Cov(\hat{\gamma}, \hat{\mu})\label{bcv}\\
&+ \frac{1}{2} \bigg( 2\mu^{-3} (\gamma-\mu^2)^{1/2}+\mu^{-1} (\gamma-\mu^2)^{-1/2} -\mu(\gamma-\mu^2)^{-3/2}\bigg) V(\hat{\mu}) \bigg]\nonumber.
\end{align}

 \item{\textbf{Gini Index}}

By using \cite{sen1973economic} alternative formulation for Gini index:
\begin{align}
G=\frac{2\gamma}{\mu} -1 \quad \text{where} \quad \gamma=\EX(Y\cdot F(Y)),
\end{align}
considering $F(\cdot)$ the cumulative distribution function of the variable of interest
and the complex survey estimator proposed by \cite{Langel2013}:
\begin{align}
\hat{G}&=\frac{2 \sum_{i \in S} w_i y_i (\hat{N_i}-w_i/2) }{\hat{N}^2\mu}-1=\frac{2\hat{\gamma}}{\hat{\mu}} -1 ,
\end{align}
where $\hat{N}_i=\sum_{k \in S} w_k I(n_k \leq n_i)$ with $n_i$ denoting the rank of the unit $i$ in sample $\mathcal{S}$ and the biased estimator defined as
\begin{align}
\hat{\gamma}=\frac{ \sum_{i \in S} w_i y_i (\hat{N_i}-\frac{w_i}{2}) }{\hat{N}^2}.
\end{align}
Thus, the approximate bias in small sample is
\begin{align}
\EX(\hat{G})-G& \cong\frac{2}{\mu} \EX(\hat{\gamma}-\gamma) + \frac{2\gamma}{\mu^3} V(\hat{\mu})- \frac{2}{\mu^2} [Cov(\hat{\mu}, \hat{\gamma})-\mu \EX(\hat{\gamma}-\gamma) ] \label{biasgini} \\
&=\frac{4}{\mu} \EX(\hat{\gamma}-\gamma) + \frac{2\gamma}{\mu^3} V(\hat{\mu})- \frac{2}{\mu^2} Cov(\hat{\mu}, \hat{\gamma}), \nonumber
\end{align}

The derivation of the approximate bias related to the weighted estimator $\hat{\gamma}$ is not trivial. As explained in the context of Gini index variance estimation by \cite{Langel2013}, its numerator is not composed of two simple sums. Indeed the quantity $\hat{N}_k$, an estimator of the rank of unit $k$, is random since its value depends on the selected sample.  An heuristic solution is to consider the approximate bias of the corresponding  i.i.d. estimator, $\EX(\hat{\gamma}-\gamma) =-\frac{1}{n_{iid}} \bigg( \gamma- \frac{\mu}{2}\bigg)$ as derived by  \cite{Davidson2009}, with $n_{iid}$ the corresponding i.i.d. sample size, so that:
\begin{align}
\EX(\hat{G})-G =\frac{-2G}{n_{iid}} + \frac{2\gamma}{\mu^3} V(\hat{\mu})- \frac{2}{\mu^2} Cov(\hat{\mu}, \hat{\gamma}).
\label{ginis}
\end{align}
This correction is in line with \cite{Davidson2009} and \cite{fabrizi2016small} proposals, whereas these are based on a first order Taylor's expansions and thus limiting to the first term of the right hand side equation (\ref{biasgini}), ours extends it to a second order expansion. This translates into the fact that, while \cite{jasso1979gini}  \cite{Deltas2003}, \cite{Davidson2009}  proposals identify the adjusted Gini in i.i.d. contexts as $n_{iid}(n_{iid}-1)^{-1}\hat{G}$ , our correction, with a further order of approximation, reconsiders the shape of the adjusted estimator as
\begin{align}
\hat{G}_{adj}= \frac{n_{iid}}{n_{iid}-2}(\hat{G}-a),
\label{shapegini}
 \end{align}
 with $a$ equals to the sum of second and third term of (\ref{ginis}).

\vspace{5mm}

\item{\textbf{Mean Log Deviation- GE($\alpha=0$)}}

\begin{align}
GE(0)=\log(\mu)- \gamma \quad \text{with} \quad \gamma=\EX(\log Y).
\end{align}
Let us note that the survey estimator \cite{Biewen2006} is
\begin{align}
\hat{GE}(0)=\frac{1}{\hat{N}} \sum_{i \in S} w_i \log \frac{\hat{\mu}}{y_i}= \log(\hat{\mu})- \hat{\gamma},
\end{align}
with $g(y_i)=\log y_i \quad \forall i \in S$ and so  $\hat{\gamma}= \sum_{i \in S} w_i \log y_i/ \sum_{i \in S} w_i $. The approximate bias is:
\begin{align}
\EX[\hat{GE}(0)]-GE(0)= \EX(\log \hat{\mu}) -\log \mu \cong -\frac{1}{2\mu^{2}} V(\hat{\mu}),
\label{breuniguno}
\end{align}
consistently with \cite{ferrantepacei2019};
note that it is structurally negative.

\vspace{5mm}

\item{\textbf{Theil Index- GE($\alpha=1$)} }

\begin{align}
GE(1)=\frac{\gamma}{\mu}-\log(\mu) \quad \text{with} \quad \gamma=\EX[Y(\log Y)].
\end{align}
Let us note that the survey estimator \cite{Biewen2006} is
\begin{align}
 \hat{GE}(1)=\frac{1}{\hat{N}} \sum_{i \in S} w_i  \frac{y_i}{\hat{\mu}} \log \frac{y_i}{\hat{\mu}}=\frac{\hat{\gamma}}{\hat{\mu}}-\log(\hat{\mu}),
\end{align}
with $g(y_i)=y_i \log y_i \quad \forall i \in S$ and so  $\hat{\gamma}= \sum_{i \in S} w_i y_i \log y_i/ \sum_{i \in S} w_i $. The approximate bias is:
\begin{align}
\EX[\hat{GE}(1)]- GE(1) \cong -\frac{ Cov(\hat{\mu}, \hat{\gamma})}{ \mu^{2}} + \bigg( \frac{\gamma}{\mu^{3}}+\frac{1}{2\mu^{2}} \bigg)V(\hat{\mu}).
\label{breunigdue}
\end{align}

 \vspace{5mm}
\item{\textbf{GE($\alpha \neq 0,1$)}}
\begin{align}
GE(\alpha \neq 0,1)=\frac{1}{\alpha(\alpha-1)}\bigg(\frac{\gamma_\alpha}{\mu^\alpha}-1 \bigg)
\quad \text{with} \quad \gamma_\alpha=\EX(Y^\alpha).
\end{align}
Considering that the survey estimator is
\begin{align}
\hat{GE}(\alpha \neq 0,1)=\frac{1}{\alpha(\alpha-1)} \frac{n'}{n'-1} \bigg(\frac{\hat{\gamma}_\alpha}{\hat{\mu}^\alpha}-1 \bigg),
\end{align}
\cite{Biewen2006} with $\hat{\gamma}=\sum_{i \in S} w_i y_i^\alpha/\sum_{i \in S} w_i $ and $\hat{\mu}$ as indicated in (\ref{eq1}).
Since $\hat{\gamma}$ is unbiased as proved above, the approximate bias is
\begin{align}
\EX[\hat{GE}(\alpha)]-GE(\alpha) \cong \frac{n'}{n'-1} \bigg[ -\frac{1}{(\alpha-1)\mu^{\alpha+1}} Cov(\hat{\gamma}, \hat{\mu})+\frac{\alpha+1}{2(\alpha-1)}\frac{\gamma_\alpha}{\mu^{\alpha+2}} V(\hat{\mu}) \bigg].
\label{bge}
\end{align}

\vspace{5mm}

\item{\textbf{Atkinson Index with $\epsilon \neq 1$} }

\begin{align}
A(\epsilon)=1-\frac{\gamma^{\frac{1}{1-\epsilon}}}{\mu} \quad \text{with} \quad \gamma=\EX(Y^{1-\varepsilon}).
\end{align}
Let us note that the survey estimator \cite{Biewen2006} is
\begin{align}
\hat{A}(\varepsilon)=1-\frac{1}{\hat{\mu}} \bigg( \frac{1}{\hat{N}} \sum_{i \in S} w_i (y_i)^{1-\varepsilon}\bigg)^{1/(1-\varepsilon)}=1-\frac{\hat{\gamma}^{\frac{1}{1-\varepsilon}}}{\hat{\mu}},
\end{align}
with $g(y_i)=y_i^{1-\varepsilon} \quad \forall i \in S$ and so  $\hat{\gamma}= \sum_{i \in S} w_i y_i^{1-\varepsilon}/ \sum_{i \in S} w_i $. The approximate bias is:
\begin{align}
\EX[\hat{A}(\varepsilon)]- A(\varepsilon) \cong -\frac{\varepsilon}{2(1-\varepsilon)^2} \mu^{-1} \gamma^{\frac{2\varepsilon-1}{1-\varepsilon}} V(\hat{\gamma})+\frac{1}{1-\varepsilon} \gamma^{\frac{\varepsilon}{1-\varepsilon}} \mu^{-2} Cov(\hat{\gamma}, \hat{\mu})-\mu^{-3} \gamma^{\frac{1}{1-\varepsilon}}V(\hat{\mu}).
\label{breunigtre}
\end{align}

 \vspace{5mm}
\item{\textbf{Atkinson Index with $\varepsilon= 1$}}

\begin{align}
A(1)=1-\frac{e^{\gamma}}{\mu} \quad \text{with} \quad \gamma=\EX(\log Y).
\end{align}
Let us note that the survey estimator \cite{Biewen2006} is
\begin{align}
\hat{A}(1)=1- \frac{1}{\hat{\mu}} \prod_{i \in S} y_i^{w_i/\hat{N}}=1-  \frac{1}{\hat{\mu}} \exp \bigg\lbrace \frac{ \sum_{i \in S} w_i \log y_i }{\hat{N}}\bigg\rbrace=1-\frac{e^{\hat{\gamma}}}{\hat{\mu}},
\end{align}
with $g(y_i)=\log y_i \quad \forall i \in S$ and so  $\hat{\gamma}= \sum_{i \in S} w_i \log y_k/ \sum_{k \in S} w_k $ as in the case of the Mean Log Deviation.
The approximate bias is:
\begin{align}
\EX[\hat{A}(1)]- A(1) \cong -\frac{1}{2 \mu}e^{\gamma} V(\hat{\gamma})+\frac{e^{\gamma}}{ \mu^{2}} Cov(\hat{\gamma}, \hat{\mu})-\frac{e^{\gamma}}{ \mu^{3}} V(\hat{\mu}).
\label{breunigquattro}
\end{align}

\end{itemize}

Note that the approximate bias expressions for complex survey estimators
in some specific cases coincide with the ones for i.i.d. estimators made explicit by \cite{Breunig2008}, see formulas
(\ref{breuniguno}), (\ref{breunigdue}), (\ref{breunigtre}), (\ref{breunigquattro}), due to the invariance properties related to expected values of sum of dependent variables.

\section{Bias Estimation}
\label{biasest}

With the aim of estimating bias of estimators proposed in Section \ref{biasresults}, we replace $\mu$ and $\gamma$ with $\hat{\mu}$ and $\hat{\gamma}$ in formulas (\ref{bcv}), (\ref{ginis}), (\ref{breuniguno}), (\ref{breunigdue}), (\ref{bge}), (\ref{breunigtre}) and (\ref{breunigquattro}). Moreover, we have to consider that those expressions (except  (\ref{breuniguno})) depend on variances and covariances involving $\hat{\gamma}$, generally non linear. Then a linearization of $\hat{\gamma}$ has been provided in order to make it tractable (section \ref{subseclinear}). Subsequently, $V(\hat{\mu})$, $V(\hat{\gamma})$ and $Cov(\hat{\mu}, \hat{\gamma})$ has been estimated (section \ref{subsecest}).

\subsection{Linearization of Non-Linear Design Estimators}
\label{subseclinear}

The linearization technique follows the intuition of approximating a nonlinear statistic with a linear function of the observations. In doing so, the linear approximation can be used to measure the precision and uncertainty associated to the nonlinear statistic, using well-known linear estimators variances and covariances. We apply the generalized linearization method \cite{deville1999variance}, \cite{demnati2004linearization}, and \cite{Osier2009}.  This method allows to encompass more non linear statistics than the Taylor method, and at the same time it does not involve more calculations, therefore being in general more flexible \cite{Osier2009}. Moreover, this methods works better when dealing with small samples.

In particular, this procedure as stated by \cite{antal2011variance}, reconciles the two approaches introduced by \cite{deville1999variance} and  \cite{demnati2004linearization}, both relying on the concept of influence function, a framework borrowed from robust statistics \cite{hampel1974influence}.
The same method has been used directly by \cite{Graf2014a} to estimate the variance of some inequality measures estimators via linearization. Following the theoretical framework of \cite{antal2011variance}, we could say that a population parameter of interest $\theta$ in a population $\mathcal{U}$ undergoes the influence of a unit $k$, which depends on an infinitesimal variation in the importance assigned to the unit.  Let us express the parameter as a functional $\theta= T(M)$ based on a measure  $M(\cdot)$ such that
\begin{align*}
\begin{cases}
M(y)=1 \quad y=y_k \quad \forall k \in \mathcal{U}\\
M(y)=0 \quad \text{otherwise},
\end{cases}
\end{align*}
The general measure M turns to a discrete measure, leading T into a discrete functional. The influence function of T, that in this case constitutes as the linearized variable $z_k$, is defined as the functional derivative
\begin{align*}
I[T(M)]_k=z_k= \lim_{t \rightarrow 0} \frac{T(M + t\delta_k)- T(M)}{t}\quad \forall k \in \mathcal{U},
\end{align*}
where $\delta_k$ is a Dirac measure for unit $k$. However \cite{deville1999variance} defines a linearized variable $\hat{z}_k$, or \textit{empirical influence function}, which takes into account that data comes from a limited sample $s$, replacing the unknowns with the corresponding estimated sample quantities. \cite{antal2011variance} present this approach with measure M formalized taking into account sampling weights and
$s$ such that
\begin{align*}
\begin{cases}
M(y)=\tilde{w}_k \quad y=y_k \quad \forall k \in s\\
M(y)=0 \quad \text{otherwise},
\end{cases}
\end{align*}
with $\tilde{w}_k $ generic weight associated to the observation $y_k$ that in our case corresponds to  $\tilde{w}_k =w_k/\sum_{i \in S} w_i$.
This alternative approach completely overcomes the fact that the starting point of Deville's approach is the population parameter rather than the sample estimator.
Since the functional is expressed as an explicit function of the variables, i.e. the weights assigned by the measure
M to the observations, the
linearized variable is merely a function of the partial derivatives with respect to the weights:
\begin{align}
I[T(\hat{M})]_k=\hat{z}_k= \frac{\partial T(\hat{M})}{\partial \tilde{w}_k}= \frac{\partial}{\partial \tilde{w}_k} \sum_{i \in S} \tilde{w}_i g(y_i)=g(y_k).
\label{linearizationformula}
\end{align}
Linearized variables for each inequality measure can be directly derived from (\ref{linearizationformula}) by substituting the measure-specific function $g(\cdot)$ explicited in Section \ref{biasresults}.

\subsection{Estimation of  $V(\hat{\mu})$, $V(\hat{\gamma})$ and $Cov(\hat{\mu}, \hat{\gamma})$}
\label{subsecest}
As regards the estimation of the design variances and covariances of linear and linearized estimators, we consider a complex survey design involving stratification and multi-stage selection, with both Self-Representing (SR) -included at the first stage with probability one - and Non Self-Representing (NSR) strata. This design is consistent with the most common income survey designs and, in general, with household surveys, whereas firm surveys are based on a single stage stratified sample design, also a special case of the two stage selection.

First of all we define the shape of the Horvitz Thompson variance estimator in case of linear (or linearized) estimators, such as $\hat{\mu}=\sum_{i \in s} \tilde{w}_i y_i $,  when $\tilde{w}_i=1/\pi_i$, as:
	\begin{align}
	V(\hat{\mu})=  \sum_{i \in s} \frac{y_i^2}{\pi_i^2} (1-\pi_i) + 2 \sum_{i \in s}   \sum_{k \in s, i \neq k}   \frac{y_i}{\pi_i}\frac{y_k}{\pi_k} \frac{\pi_{ik}-\pi_i \pi_k}{\pi_{ik}},
	\end{align}
	with $\pi_{i k}$, $\forall  i, k \in \mathcal{U}, i \neq k$ second order inclusion probabilities i.e. the probability that the sample includes both $i$-th and $k$-th units, $\pi_{ik}=\sum_{s \in \mathcal{S}_i \cap \mathcal{S}_k} p(s)$.
	However generally (a) $\tilde{w}_i \neq 1/\pi_i$ and (b) $\pi_{ik}$, $\forall  i, k \in \mathcal{U}, i \neq k$ are difficult to calculate under complex sampling designs.

  Therefore, the variance estimator to be considered constitutes as an approximation relying on simplified assumptions. We assume Primary Sampling Units (PSU) are sampled with replacement, and secondly multi-stage sampling is reduced to a single stage process using the Ultimate Clusters technique \cite{kalton1979ultimate}. Moreover we take into account the hybrid nature of the probability scheme, blending a stratified design variance estimator for the SR strata with a finite population correction factor and a typical Ultimate Cluster approximation-based variance estimator for the multi-stage scheme in NSR strata, widely used in official statistics. See \cite{Osier2013} for Eurostat procedures.
Therefore, considering without loss of generality a two-stage scheme, let $\hat{\mu}=\sum_{h}\sum_{d}\sum_{i} \tilde{w}_{hdi} y_{hdi}$ with $h$ stratum indicator, $d$ Primary Sampling Unit (PSU) indicator and $i$ Secondary Sampling Unit indicator (SSU), be a linear estimator for $\mu$, its standard error estimate
 is as follows:
 \vspace{-2mm}
\begin{align}
\hat{V}(\hat{\mu})& =\sum_{h=1}^{H_{SR}} V(\hat{\mu}_h)+\sum_{h=1}^{H_{NSR}} V(\hat{\mu}_h)\nonumber\\
&= \sum_{h=1}^{H_{SR}} M_h^2 (1-f_h) \frac{s_{h}^2}{m_h} +\sum_{h=1}^{H_{NSR}} n_h   s_{\hat{\mu}_h}^2 \label{eurostat}\\
&=\sum_{h=1}^{H_{SR}} M_h \frac{M_h-m_h}{m_h(m_h-1)} \sum_{i=1}^{m_h} (y_{hi}- \bar{y}_{h} )^2+\sum_{h=1}^{H_{NSR}} \frac{n_h}{n_h-1} \sum_{d=1}^{n_h} (\hat{\mu}_{hd}- \bar{\mu}_{h})^2,\nonumber
\end{align}
with $H_{SR}$ self-representative and $H_{NSR}$ non self-representative strata, $M_h$ number of resident households in strata $h$, $m_h$ number of sample households in strata $h$, $f_h=m_h/M_h$ finite population correction factor, $n_h$ number of PSUs in strata $h$.
Consider $\bar{y}_{h} = \sum_{i=1}^{m_h} y_{hi}/ m_h$, $\hat{\mu}_{hd}= \sum_{i=1}^{m_d} \tilde{w}_{hdi}y_{hdi}$ with $i$ household label of stratum $h$ and PSU $d$, with a total of $m_i$ per PSU and $\bar{\mu}_{h}=\sum_{d=1}^{n_h}\hat{\mu}_{hd}/n_h$, lastly $n_h$ is the number of PSU in stratum $h$.
If however $n_h = 1$ for some strata, the estimator (\ref{eurostat}) cannot be used. A solution is to collapse strata to create "pseudo-strata" so that each pseudo-stratum has at least two PSUs. Common practice is to collapse a stratum with another one that is similar w.r.t. the target variables of the survey  \cite{rust1987strategies}.

Secondly, an estimator of $V(\hat{\gamma})$ can be obtained after the linearization of $\hat{\gamma}$, leading to $V(\hat{\gamma}) \cong V(\sum_{i \in S}  \tilde{w}_{i} \hat{z}_{i})$, and by adopting the same strategy used for $V(\hat{\mu})$ in (\ref{eurostat}).

Thirdly, as regards the estimation of the design-based estimators covariance, $Cov(\hat{\gamma}, \hat{\mu})$ let us consider that
\begin{align}
Cov(\hat{\gamma}, \hat{\mu}) = \frac{1}{2}\bigg[V(\hat{\gamma} +\hat{\mu})-
V(\hat{\gamma})-V(\hat{\mu}) \bigg].
\label{covariance1}
\end{align}
Thus, a possible estimator for the design covariance would be simply obtained by plugging in the variance estimates previously mentioned, while the first term of the left-hand side of the formula could be estimated by simply considering $\hat{\gamma} +\hat{\mu}=\sum_{i \in S} \tilde{w}_i (\hat{z}_i +y_i)$ using (\ref{eurostat}). In fact, the estimation procedure involves substituting the linearized variables $\hat{z}_k$, different for each measure, in (\ref{eurostat}) and (\ref{covariance1}) in order to estimate $V(\hat{\gamma})$ and $Cov(\hat{\mu}, \hat{\gamma})$.

Lastly as regards Gini index, the $\hat{\gamma}$ bias (B) has already been adapted to the complex survey case by \cite{fabrizi2016small}, with an heuristic solution as follows
 \begin{align}
\hat{ B}(\hat{\gamma})= -\frac{\sum_{q \in S} (\sum_{i=1}^{r_q} w_{qi})^2}{\hat{N}^2} \bigg( \hat{\gamma}- \frac{\hat{\mu}}{2}\bigg),
 \end{align}
 with $\sum_{i=1}^{r_q} w_{qi}$ the sum of the weights associated with the $r_q$ individuals living in household $q$. However, in our case we opt for $- \frac{1}{n'} \bigg( \hat{\gamma}- \frac{\hat{\mu}}{2}\bigg)$, since involving survey weights could dramatically bias the estimator of the effective sample size quantity. Thus our bias estimator is
\begin{align}
\hat{B}(\hat{G})& \cong-\frac{2G}{n'} + \frac{2\hat{\gamma}}{\hat{\mu}^3} V(\hat{\mu})- \frac{2}{\hat{\mu}^2} Cov(\hat{\mu}, \hat{\gamma}).
\end{align}

\section{Design-Based Simulation on Bias Correction}
\label{simulationsection}

A first design-based simulation study has been carried out in order to evaluate the bias correction framework proposed in the previous section. In this simulation, the cross-section Italian EU-SILC sample (2017 wave) has been assumed as synthetic population and the 21 NUTS-2 regions have been considered as target domains. The study is based on real data, rather than use data generated under some specific distribution models, in order to check whether this specific framework can work with close-to-reality income data.

However, those data have been treated in order to circumvent non-robustness problems.  The issue of robust estimation of economic indicators based on a semi-parametric Pareto upper tail model is well-established in literature see \cite{Brzezinski2016} for a review and \cite{alfons2013robust} for a specification suitable for survey data. On the contrary, the issue of robust treatment of outlier in the lower tail of income distribution appears less established, see \cite{van2007extreme}, \cite{masseran2019power}.
As regards the upper tail we operated a semi-parametric Pareto-tail modeling procedure using the Probability Integral Transform Statistic Estimator (PITSE) proposed by \cite{Finkelstein2006}, which blends very good performances in small samples and a fast computational implementation, as suggested by \cite{Brzezinski2016}.  As regards the lower tail extreme value treatment, we used an inverse Pareto modification of PITSE estimator, suggested by \cite{masseran2019power}.
In our simulations the treatment has been done at a regional level to the original EU-SILC sample and the detection of outliers has been carried out following \cite{safari2018outliers} by using a Generalized Boxplot outlier detection procedure proposed by \cite{bruffaerts2014generalized}. In order to deal with skewed and heavy-tailed distribution, \cite{bruffaerts2014generalized} suggested modifying the whiskers of the boxplot by a simple rank-preserving transformation that allows for a so-called fitting for $Tukey$ $g-$ and $h-$ distribution. Based on the simulations performed by \cite{safari2018outliers}, the generalized boxplot gives a higher power value compared to the adjusted and standard boxplot.
Moreover, we compare the results obtained after the treatment with those obtained by retained the outliers in the synthetic population, in order to isolate the effect of outliers on the performance of the corrections proposed (Table \ref{Tab:Tcr}).

From the assumed population, we repeatedly select 1000 two-stage stratified samples, mimicking the sampling strategy adopted in the survey itself: in the first stage, Self-Representing (SR) strata are always included in the sample, while a stratified sample of PSU in Non Self-Representing (NSR) strata is selected; in the second stage, a systematic sample of households is selected from each municipality included in the first stage.
We repeated the drawing for two different overall sampling rates, 1,5\% and 3\% respectively. Results are set out in Table~\ref{Tab:Tcr} with the Average Relative Bias (ARB) and the Average Absolute Relative Error (AARE) in percentage, calculated for the 1000 samples and the $21$ regions defined as:
\begin{align*}
ARB&=\frac{1}{21} \sum_{r=1}^{21}  \frac{1}{1000} \sum_{m=1}^{1000}\bigg( \frac{\hat{\theta}_{m,r}}{\theta_r} -1 \bigg), \\
AARE&=\frac{1}{21} \sum_{r=1}^{21}\frac{1}{1000}  \bigg( \sum_{m=1}^{1000}   \bigg|  \frac{\hat{\theta}_{m,r}}{\theta_r} -1 \bigg| \bigg),
\end{align*}
\noindent where $\theta_r$ is the population value for region $r$ and $\hat{\theta}_{m,r}$ is its estimate using sample $m$.
In our simulation setting the regional sample size ranges from 6 to 96 individuals (from 6 to 32 households) for the 1,5\% sampling rate, and from 11 to 196 individuals (10 to 74 households) for the 3\% sampling rate.

As clear from Table \ref{Tab:Tcr}, bias reported on data without Extreme Value treatment can be dramatically high due to the non-robustness properties of some measure to extreme values, as the case of A($\varepsilon=2$), extremely sensible to low income values (under $100$ euro per year) which is -48\% biased on average in case of 1,5\% sample rate.  Also GE with $\alpha=1,2$ values are highly sensible to high income values being -18\% and -23\% biased.
Moreover, the negative correlation between sample size and bias is less marked in case of non-treated data, since bias depends more on whether a sample is affected by extreme values or not. On the contrary, the bias-correction seems to not change in magnitude depending on the sample size and on the presence of extreme values, showing robustness properties.

\begin{table}
\centering
\begin{tabular}{rrrrrrrrrr}
 && \hspace{3mm}CV & GE(0) & GE(1) & GE(2) &A(0.5) & A(1) & A(2) & G\\
   \multicolumn{4}{c}{without Extreme Value treatment}\\
  \hline
   1.5\% &&&&&&&&&\\
&ARB &-18.2 & -12.7 & -17.5 & -23.3&-15.3 & -15.6& -48.0 &  -14.4 \\
  $\hat{\theta}\quad$& AARE & 30.0 & 52.9 & 46.4 & 53.5 &45.9  & 47.4 & 56.8 &  25.6 \\
 \hline
  &ARB & -12.1 & -3.9 & -8.7 & -15.0 &  -6.3 & -5.9 & -41.6 &0.4 \\
  $\hat{\theta}_{corr}$& AARE & 29.3 & 54.4 & 48.0 & 55.7 & 47.5 & 49.4 & 54.6 & 35.5 \\
  \hline
   3.0\%&&&&&&&&& \\
  &ARB & -12.7 & -6.8 & -10.5 & -15.8 & -8.7 &-8.4 & -38.1 &  -7.3 \\
  $\hat{\theta}\quad$&  AARE &24.5 & 39.4 & 36.0 & 46.2 &34.3 & 35.6 & 49.0 &  17.7\\
  \hline
 & ARB & -7.8 & -1.2 & -3.9 & -8.0 &-2.5 &-2.0 & -32.4 &  0.2 \\
&ARB ($n\geq20$)& -8.3 & -1.2&  -3.6&  -8.7&-2.3&  -1.7& -30.0&   -1.1\\
  $\hat{\theta}_{corr}$ & AARE & 24.8 & 40.4  & 37.9 & 49.4 &35.7& 37.0 & 48.2 &  20.8\\
&&&\\
 \multicolumn{4}{c}{with Extreme Value treatment}&&&&&&\\
  \hline
 1.5\% &&&&&&&&&\\
&ARB &-11.9& -13.1 & -15.3 &-17.0&-14.2& -14.3 & -18.3 &  -14.2\\
   $\hat{\theta}\quad$& AARE &25.8& 44.0 & 42.6 &47.6& 41.6 &40.6 & 38.2 & 24.3\\
  \hline
&ARB &-5.6& -3.5 & -6.3 &-8.7& -4.9&-4.7 & -8.6 & 0.6\\
   $\hat{\theta}_{corr}$ &  AARE &25.9& 46.2 & 44.6 &49.9&  43.6 &42.5 & 39.3 &34.1\\
  \hline
 3.0\%&&&&&&&&& \\
&ARB &-7.4& -6.4 & -8.3 & -10.3&-7.3&-7.1 & -9.4 & -7.1\\
   $\hat{\theta}\quad$  &AARE &19.8& 31.6 & 31.7&37.8& 30.2 & 29.1 & 27.2 & 16.5\\
   \hline
  & ARB &-2.8& -0.6 & -2.2 &-3.5 & -1.4 &-1.1& -2.8 & 0.3\\
&ARB ($n\geq20$)& -1.4 & -0.3 & -1.2 & -1.5 &  -0.7&-0.5 & -1.4 &-0.9 \\
   $\hat{\theta}_{corr}$ & AARE &20.4& 33.0 & 33.3 &40.2& 31.7 & 30.4 & 28.4 &19.5\\
\end{tabular}
\caption{Percentage ARB and AARE for the 21 target domains.}
\label{Tab:Tcr}
\end{table}

\begin{figure}
    \centering
    \includegraphics[scale=0.43]{scatter_gini.pdf}
  \caption{Relative Bias of non-corrected measures (grey line), and of corrected measures (blue line) in 3\% samples after extreme value treatment.}
  \label{plotbias}
\end{figure}

Concerning extreme value treated data results, Figure \ref{plotbias} clearly illustrates the negative correlation between sample size and average relative bias in the 21 italian regions for both the design-based estimator $\hat{\theta}$ and the bias corrected estimator $\hat{\theta}_{corr}$. The reduction of the bias provided by the correction is noticeable for all measures, leading to slightly biased (-1/-2\%) or even approximately unbiased estimates when $n \geq20$ depending on the measure. Notice that the bias correction works well for those measures not particularly sensitive to extreme observations such as Gini index, GE$(0)$, Atk$(0.5)$ and Atk$(1)$. In case of CV and GE$(2)$, the correction provides good results, but it seems however to not capture totally all the bias components. This confirms the results of \cite{breunig2001almost}, suggesting that the coefficient of variation squared and GE(2) bias depends on the coefficient of skewness of the income distribution (remember that GE$(2)=$CV$^2/2$), not considered in our bias correction. Actually, a reliable estimation of that quantity, while being straightforward in the i.i.d. case, appears cumbersome in case of weighted data being basically defined on a discrete grid of values. This leads to the non applicability of the bias formula derived by \cite{breunig2001almost} in our case. Furthermore, the bias-correction induces a slight but negligible error increase, except for Gini index case that presents a relevant increase. This is due to the shape of the unbiased estimators, as described by (\ref{shapegini}), where a sum of estimators is multiplied by a factor $n_{iid}/(n_{iid}-2)$, substituted by $n'/(n'-2)$ in the estimation, that inherently inflates the variance by its square.

This results may constitute as a valuable reference guideline when measuring inequality in small samples.  When extreme values can be considered as a consequence of data contamination, extreme value treatment and bias-correction provides approximately unbiased or slightly bias estimates for a large class of measures. On the other hand, when extreme values constitutes as representative observations, it becomes necessary to restrict the attention to the most robust measures such as GE with $\alpha=0$, Atkinson index with $\varepsilon=1$ and Gini Index. Another important aspect to point out is that, in certain countries, the EU-SILC is based on registers that better capture top incomes, thus, a cross-country comparison of income inequality by effects on a tail-sensitive measure must be another reason for caution \cite{Atkinson2015}.

\section{Bootstrap Variance of the Bias-Corrected Estimators}
\label{bcvariance}

Concerning inequality design-based estimators, their variance estimation may be easily carried out via linearization as seen in Section \ref{biasresults}. Linearized variables for each measure may be easily derived from (\ref{linearizationformula}) consistently with \cite{Langel2013} results for Gini Index and \cite{Biewen2006} results for Generalized Entropy and Atkinson Indexes. On the other hand, the estimation of bias-corrected estimators variance adds a new level of complexity since the estimator formula is no longer the classical one. In fact it comprises a bias-correction component that appears cumbersome to estimate via linearization since it is inherently a results of several linearizations, leading to an over-simplified and unreliable linearization loop.

We approach the variance estimation issue by taking into account strategies based on resampling methods, that have been largely used in literature, since our main aim is to provide a general "turn-key" solution for variance estimation. Specifically, we opt for a proper design-aware bootstrap procedure as developed before by \cite{fabrizi2011hierarchical} and \cite{fabrizi2020functional} for EU-SILC data. A comprehensive review for bootstrap method in case of survey data can be found in \cite{lahiri2003impact} and an interesting comparison between variance estimation techniques for poverty and inequality measures in complex surveys has been carried out by \cite{de2020variance}. Generally, bootstrap algorithms for complex samples rely on the assumption that the number of strata is large and on resampling of primary units within strata: few primary units are sampled from each stratum so that the sampling fraction at the first stage is negligible \cite{rao1999some}. This assumption is however not satisfied in small samples. An alternative solution may be split up primary units into multiple parts to resample, to extremes into secondary units. Thus, our strategy selects units with a stratified single-stage design with replacement from the population of households considering geographical macro-strata.  After the drawing, a calibration procedure has been put in place for each bootstrap sample, in order to adjust weights to known gender and age classes totals similarly to the calibration procedure applied to the original sample. The algorithm is similar to the ones proposed by \cite{fabrizi2011hierarchical}, which provides estimates close to the ones obtained using linearization method in case of simpler parameters.

Results on changes in variability depending on sample sizes are provided in Figures \ref{boxp} and \ref{cvvsn}. Notice that the analysis discriminates between the behavior of the region whose presents a upper tail extreme values, called "outlier region", see Figure \ref{boxp}, and the others.
Specifically, bootstrap coefficient of variation estimates
on Italian NUTS-2 region are provided versus the sample sizes in Figure \ref{cvvsn}.
 It is quite interesting to notice that a small-sized extreme-valued-affected sample has always high variances estimates across all measures. However the sensibility to small sizes changes depending on the measure analyzed. In fact the more GE parameters $\alpha$ increases i.e. it becomes more sensibile to upper tail values, the more the estimator variance is affected only by the presence of upper extreme values rather than the size. Vice versa, the more Atkinson $\varepsilon$ increases becoming more sensible to lower tail, the more its variances becomes negatively correlated to sample sizes.

\vspace{5mm}

\begin{figure}
    \centering
   \includegraphics[scale=0.43]{boxplot_regions.pdf}
  \caption{Distribution of Equivalized Disposable Income for each NUTS-2 region, outlier region in orange. }
 \label{boxp}
\end{figure}

\begin{figure}
    \centering
   \includegraphics[scale=0.43]{boot_var.pdf}
  \caption{Bootstrap Coefficient of Variation estimates for each inequality measures. }
   \label{cvvsn}
\end{figure}

\section{Bias-Corrected Estimators Distribution}
\label{bcdistribution}

Literature on the probability distribution of inequality measures in small sample is scarce. \cite{kakwani1990large} and \cite{Thistle1990} have studied the asymptotic distribution of Generalized Entropy measures and Atkinson Index proving their asymptotic normality. As regards Gini index, results on asymptotic normality of the different estimators are well-established, see \cite{giorgi2017gini} for a comprehensive review. Interesting performance comparisons between asymptotic and bootstrap inference for inequality measures are provided by \cite{biewen2002bootstrap} and \cite{Davidson2007}.

Here, a distributional analysis has been developed in two parts.  A first part exploits empirical distributions from design-based simulation described in Section~\ref{simulationsection}, to evaluate for each measure the different rate of convergence to well-behaved distributional shapes, considering varying sample sizes.
In the second part we perfomed a model-based simulation, using generated income data and unequal probability sampling in a more controlled setting. The aim of the latter one is to study  the behavior of inequality measure at varying income distributional assumptions and at the same time, to evaluate the fitting of resulting IM distributions to assumed parametrical density with differing responsiveness to outlier and robustness properties. We considered both mean modelling and median modelling based distributions.

\subsection{Design-based Simulation}
Here is provided a brief analysis on the distribution of inequality measures in samples of increasing size, to evaluate how quickly their distribution tend to become symmetric. We considered regions as target domains and, using the same simulation setting of Section~\ref{simulationsection}, drawing $m=1000$ small samples by mimicking the stratified multi-stage survey design with different sampling rates, i.e. 10\% (from 36 to 607 individuals, 28 to 254 households), 5\% (from 16 to 337 individuals, 14 to 131 households) and 3\% (from 11 to 196 individuals, 10 to 74 households). Coefficient of skewness $\eta_3$ and excess kurtosis $\eta_4$ empirical values are set out in Table \ref{sk} for different sampling rates.
As its clear from the results, as the sample size decreases, the empirical distributions tend to become more positively skewed and leptokurtic. This is quite evident for the General Entropy measures, similarly but to a lesser extent for the other measures.  The empirical distributions of the considered measures for each region are set out in Figure \ref{empdist}.
The failing of asymptotic normality for these measures warns to not consider for small samples parametric methods of inference based on such an assumption.

\begin{table}
\centering
\begin{tabular}{rrrrrrrrrr}
  \hline
& & CV & GE(0) & GE(1) & GE(2) & A(0.5) & A(1) & A(2) &G \\
    \hline
  10\% &  $\hat{\eta_3}$ & 0.81 & 0.66 & 0.88 & 1.30 & 0.71 & 0.54 & 0.26 &0.38\\
  &$\hat{\eta_4}$ & 1.16 & 0.91 & 1.60 & 2.87& 1.06 & 0.57 & -0.01 & 0.34\\
     \hline
   5\% &$\hat{\eta_3}$ & 1.00 & 0.94 & 1.19 & 1.80 & 0.96& 0.74 & 0.40 & 0.54\\
 & $\hat{\eta_4}$& 1.88 & 1.73 & 2.81 & 6.09  &1.81& 1.01 & 0.08 & 0.56\\
   \hline
   3\% &$\hat{\eta_3}$& 1.00 & 1.07 & 1.27 & 1.90 &1.04& 0.83 & 0.49 &  0.58 \\
 & $\hat{\eta_4}$& 1.66 & 1.94 & 2.87 & 6.13 &  1.87& 1.03 & 0.03 & 0.60 \\
   \hline
\end{tabular}
\caption{Coefficients of Skewness and Excess Kurtosis for the Inequality Measures Empirical Distributions from Design-Based simulation.}
\label{sk}
\end{table}

\begin{figure}
    \centering
   \includegraphics[scale=0.43]{distributions.pdf}
 \caption{  Inequality Measures Empirical Distributions by regions for the 3\% samples from Design-based Simulation.}
  \label{empdist}
\end{figure}

\subsection{Model-based Simulation}

A model-based simulation has been also performed using the R package \texttt{simFrame} \cite{Alfons2010}, in order to provide a more comprehensive study about the distributional form of inequality measures estimators in small samples and complex survey context. In fact, the use of simulated data allows us to carry on the analysis in a more controlled setting, without potential confounding factors related to survey data collection dynamics.

A first step involve a preliminary fitting on EU-SILC income data via weighted pseudo-loglikelihood maximization of a plethora of suitable income distribution such as Log-Normal, Dagum, Singh-Maddala and Generalized Beta of the Second Kind (\cite{Atkinson2015}, pages 371-375).   The pseudo-log-likelihood constitutes as a weighted sum over the sample of the distribution log density, where the weights are the sampling weights \cite{Graf2014}. Maximizing it permits to take the sampling design into consideration.
Results related to some goodness-of-fit such as AIC and BIC measures are displayed in Table \ref{pseudo}.

The highly flexibility of the GB2 due to its four parameters allows the best fitting in comparison to the other distributional assumptions. We decided therefore to use the best two models (GB2 and log-normal ones) to generate income data, in order to be able to analyse and capture differences in estimators behavior to varying income distributional assumptions.
We simulate two different finite populations with size N=10.000, from Log-Normal ($\mu=9.64, \sigma=0.43$) and GB2 ($a=4.11, b=2.16 \cdot 10^4, p=0.47, q=0.92$) with parameters resulting from maximum pseudo likelihood estimation.

Following the approach of \cite{alfons2013robust}, in order to introduce a complex survey mimicking setting, we create an auxiliary variable attached to each population unit $p=p_1, \dots ,p_N$ denoting probability weights. It has been constructed taking $s=100$ equally spaced values between 1 and 10 as follows:

\begin{align*}
p_i = \begin{cases}
1 \quad  \quad &x_i>F^{-1}_\theta(\frac{s-1}{s})\\
10-\frac{9}{s-1} j \quad \quad &F^{-1}_\theta(\frac{j}{s})< x_i \leq F^{-1}_\theta(\frac{j+1}{s}) \quad \text{for any} \quad 1 \leq j  < s-1\\
10 \quad \quad &x_i\leq F^{-1}_\theta(\frac{1}{s}),
\end{cases}
\end{align*}

\noindent with $F_\theta$ the cumulative distribution function of a Pareto distribution.
From each of the two populations, 3.000 samples are drawn with three different sample sizes $n=(20, 50, 80)$.

The drawing has been performed by using Midzuno's method for unequal probability sampling \cite{midzuno1952sampling} with inclusion probabilities proportional to probability weights $p$.
As a consequence, the observations with lower incomes results to have higher inclusion probabilities and in turn lower sample weights. This intuition comes from \cite{alfons2013robust}, and it is motivated by the fact that in income survey, generally higher inclusion probabilities are often assigned to larger households, which typically have lower equivalized income than smaller households. In addition, the above definition of the probability weights induces large variation between weights.
For each sample, bias-corrected inequality estimators has been calculated using Horvitz-Thompson estimator variances under Midzuno scheme \cite{narasimha1980modification}.

We transformed General Entropy measure with double-bounded support such as Theil's Index ($\alpha=1$) and GE($\alpha=2$) to relative Entropy measures (RE), i.e. $\text{RE}(\alpha)=\text{GE}(\alpha)/\text{max}(\text{GE}(\alpha))$ in order to deal with measures defined on a unique support.
Lastly, we considered only measures defined on $[0,1]$ such as Atkinson Indexes, Gini coefficient and RE, and we proceeded by fitting three distributions on estimators samples differentiated for each fixed sample sizes $n$. Figure \ref{figure5} displays how changes in family parameter values, underlying income distribution and sample sizes, have an impact on bias-corrected estimators distributions of the Atkinson measures. GE measures evolution depending on varying parameter values does not show such relevant changes.

We considered the well-known Beta distribution, and some alternative distributions defined on $(0,1)$ such as the Simplex distribution  \cite{barndorff1991} and L-Logistic distribution. Simplex, pertaining to the dispersion models family, is known to be an alternative to Beta distribution in terms of over-dispersion control \cite{Sen1999}, robustness \cite{Espinheira2020} and large left and right skewness modeling \cite{Carrasco2019}. The last two issues seems quite crucial when dealing with IM estimators. It is a two parameters distribution, one governing the mean, and the other the dispersion. On the other hand, L-Logistic distribution, which was originally proposed by \cite{tadikamalla1982systems}, through a transformation of the standard logistic distribution, considers as parameters the median and
a shape parameter. Its choice is motivated by the fact that, if the data are skewed, since the median is a natural robust measure of the center, the median modelling can be more useful than mean modelling adopted in Beta and regression models, providing an interesting alternative.

Results are set out in Table \ref{ln}  with a goodness-of-fit evaluation via AIC and BIC Information Criterions, consider that all the distributions have the same number of parameters ($p=2$). Goodness-of-fit EDF statistics are not included due to their unreliability in case of model parameters estimated from the data. In all the cases robust alternatives distributions provide better performance than Beta distribution. Whereas in case of log-normal income, Simplex distribution provides greater fit, on the other hand in case of GB2 income, inequality estimators distributions presents large variability and very high kurtosis values as displayed in Table \ref{kurtosis} and thus a median-modeling distribution such as L-Logistic seems to work better. Beta fitting is worse in case of distributions too close to the zero-boundary, as in the case of $RE(2)$ values with moderately large population sizes. Consider that $\hat{RE}(2)=\hat{GE}(2)/\bigg( \frac{N-1}{2}\bigg)$, thus as long as the true population size $N$ increases,  $\hat{RE}(2)$ shrinks dramatically close to zero-boundary, being difficult to be handled. This shrinks is less pronounced in case of $\hat{RE}(1)=\hat{GE}(1)/\log N$.

\begin{table}
\centering
\begin{tabular}{rrr}
  \hline
 & AIC & BIC \\
  \hline
Log-Normal & 25.75 & 43.34\\
  Singh-Maddala & 28.00 & 54.38  \\
  Dagum & 27.76 & 54.14  \\
    GB2 & -13.17 & 22.01 \\
   \hline
\end{tabular}
      \caption{Income distribution goodness-of-fit results from Model-based Simulation.}
         \label{pseudo}
\end{table}

\begin{figure}
    \centering
    \includegraphics[scale=0.4]{atk_logn_vs_gb2.pdf}
  \caption{Atkinson Indexes empirical distributions related to model-based simulation from Log-Normal income assumption (blue lines) and GB2 income assumption (orange lines), darker palette refers to decreasing sample sizes. }
  \label{figure5}
\end{figure}

\begin{table}
\centering
   \begin{tabular}{rrr|rr}
  &\multicolumn{2}{c}{Log-Normal Population}  &  \multicolumn{2}{c}{GB2 Population}   \\
  \hline
       & AIC & BIC   & AIC & BIC\\
        \multicolumn{2}{c}{Beta}    &&&\\
 RE(1) & -8719.05 & -8709.23 &-7369.32 &-7359.50\\
RE(2)  & -10911.71 &-10901.90  & -9380.29 &-9370.47 \\
    A(0.5)   & -5776.14 & -5766.33 & -4455.21 & -4445.40 \\
 A(1)   & -4524.47 & -4514.66  & -3232.46 & -3222.65 \\
 A(2)   & -3452.54 & -3442.72  & -1891.27 & -1881.45 \\
  G & -3487.33 & -3477.51 & -2772.32 & -2762.50 \\
  \hline
  \multicolumn{2}{c}{Simplex} &&& \\
  RE(1)  &-8794.90&  -8785.08  & -7507.13& -7497.31 \\
RE(2) &-11019.40 & -11009.59& -9601.15& -9591.33\\
 A(0.5) & -5840.08 & -5830.27   & -4550.89 & -4541.07 \\
 A(1)& -4576.11 & -4566.29 & -3280.62 & -3270.81 \\
 A(2) & -3482.09 & -3472.27  & -1901.25 & -1891.43 \\
G & -3509.29 & -3499.48 & -2788.63 & -2778.82 \\
\hline
  \multicolumn{2}{c}{L-Logistic}  &&& \\
  RE(1) & -8783.11 & -8773.29 & -7589.79 & -7579.97 \\
RE(2)&-11018.02 &-11008.20&  -9708.50& -9698.68 \\
     A(0.5) & -5826.16 & -5816.34  & -4635.19 & -4625.38 \\
 A(1)  & -4559.71 & -4549.90& -3351.73 & -3341.92 \\
 A(2) & -3459.65 & -3449.83 & -1906.81 & -1896.99 \\
  G  & -3496.99 & -3487.17  & -2880.50 & -2870.68 \\
   \hline
\end{tabular}
      \caption{Model-Based Simulation Results on bias-corrected estimator distributions fitting.}
\label{ln}
\end{table}

\begin{table}[ht]
\centering
\begin{tabular}{rrrrrrrr}
  \hline
&&RE(1) & RE(2) & A(0.5) & A(1) & A(2) & G  \\
  \hline
&$\hat{\eta_3}$ & 1.68 & 2.19& 1.47 & 1.26 & 0.88 & 0.80   \\
 \text{logN}&$\hat{\eta_4}$ & 4.50 & 8.02& 3.37 & 2.38 & 1.03 & 0.77 \\
    \hline
&$\hat{\eta_3}$& 3.45 & 4.63 & 2.83 & 1.98 & 0.71 & 1.50  \\
\text{GB2}&$\hat{\eta_4}$ & 19.87 & 32.92 & 14.39 & 7.61 & 0.46 & 4.07  \\
   \hline
\end{tabular}
\caption{Mean values of Skewness and Kurtosis coefficients of the 21 regions empirical distributions from Model-based Simulation.}
\label{kurtosis}
\end{table}

\section{Conclusions}
\label{conclusions}

A strategy to correct bias of inequality measures estimators in small samples has been proposed and a sensitivity analysis has been conducted in order to study the magnitude of the correction and its sensibility to extreme values via a design-based simulation and EU-SILC data income for Italy. The underlined heterogeneity of sensibilities and bias across measures can guide analysts in choosing the most suitable inequality measure depending on the context. Furthermore, this contribution may prove extremely useful in other application contexts in which those measures are used. Overall, the most famous Gini and Theil indexes are widely applied in several fields which make use of survey data in the estimation of inequality and concentration of a large plethora of socio-economic phenomena.

Generally, measures structurally more sensible to values on the tails appears to be more biased, particularly GE($\alpha=2$) and Atkinson($\epsilon=2$), reaching in some cases a bias of respectively more than -20\% and more than -45\%.
This problem can be circumvented, under the assumption of data contamination via a semi-parametric Pareto-based treatment of the tails, and bias can be corrected or reduced via bias-correction proposal set out. In cases where extreme values cannot be considered as a consequence of data contamination but rather constitutes as representative observations, we suggest to use the most robust inequality measure such as GE with $\alpha=0$ and Atkinson index with $\varepsilon=1$, that, with our bias-correction, are approximately unbiased when sample sizes $n\geq 20$.

Besides, a bootstrap variance estimation proposal and a distributional evaluation of the corrected design-based estimators has been developed. Results about the inequality estimators distributions show increasing positive skewness and lepto-kurtosis at decreasing sample sizes, confirming the non-applicability of gaussian assumption in small samples. As regards measures defined on [0,1], model-based simulations shows that alternative robust distributions rather than Beta have a better goodness-of-fit, paving the way to the development of alternative parametric methods of inference when dealing with inequality in small samples.

Further directions of research include, on one side, extending this framework to other widely used inequality measures such as those based on quintiles, on the other side exploring and applying variance reduction techniques to the bias-corrected estimators in small samples in order to provide more reliable inequality parameter estimates.

\bibliographystyle{abbrvnat}

redpajama_set_name: RedPajamaArXiv


Workwise Advisory Services' range of services are designed to ensure that your business is compliant in an ever-changing and complex legal environment.
As well as Human Resources and Industrial Relations, we support our members and clients through regular information and awareness training seminars, briefing and business sessions, and work with local business groups and Chambers of Industry throughout regional WA.
Our clients receive regular electronic bulletins, up-to-date award information, and access to our team of experts to ensure they are familiar with the latest developments in employment and industrial relations law, and are guaranteed discounted rates to our training and breakfast seminars.
For information on a specific area of concern your business may be experiencing click on one of the following links, or contact us for a consultation.


Curaprox CPS06 pack of 25 Prime series turquoise interdental brushes all with handles. Money saving bulk pack.
Buy a bulk 25 pack of any of our Prime series interdental brushes and save money. All pre mounted on convenient Handy style handles.
CURAPROX PRIME SERIES - All made with our patented CURAL surgical wire offering extreme durability with the thinnest available wire cores.
CURAPROX PRIME presents a totally new generation of interdental brushes for everybody's use - stiffer than ever, finer than ever and better than ever.
CURAPROX PRIME respects the papilla (which floss cannot) and is equally suited to young and elderly, skilled and less skilled individuals. CURAPROX PRIME is for everybody.
Each brush should last for 10 to 14 days with correct use.
Brushes can be REMOVED from their pre-mounted handles for use with your handle of choice.


text:
<title>Zero Length - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.7">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C-Extensions.html#C-Extensions" title="C Extensions">
<link rel="prev" href="Fixed_002dPoint.html#Fixed_002dPoint" title="Fixed-Point">
<link rel="next" href="Variable-Length.html#Variable-Length" title="Variable Length">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">

<meta http-equiv="Content-Style-Type" content="text/css">

Next: Variable Length,
Previous: Fixed-Point,
Up: C Extensions

5.14 Arrays of Length Zero

Zero-length arrays are allowed in GNU C.  They are very useful as the
last element of a structure which is really a header for a variable-length
object:

     struct line {
       int length;
       char contents[0];
     };

     struct line *thisline = (struct line *)
       malloc (sizeof (struct line) + this_length);
     thisline->length = this_length;

In ISO C90, you would have to give contents a length of 1, which
means either you waste space or complicate the argument to malloc.

In ISO C99, you would use a <dfn>flexible array member</dfn>, which is
slightly different in syntax and semantics:

Flexible array members are written as contents[] without
the 0.

Flexible array members have incomplete type, and so the sizeof
operator may not be applied.  As a quirk of the original implementation
of zero-length arrays, sizeof evaluates to zero.

Flexible array members may only appear as the last member of a
struct that is otherwise non-empty.

A structure containing a flexible array member, or a union containing
such a structure (possibly recursively), may not be a member of a
structure or an element of an array.  (However, these uses are
permitted by GCC as extensions.)

GCC versions before 3.0 allowed zero-length arrays to be statically
initialized, as if they were flexible arrays.  In addition to those
cases that were useful, it also allowed initializations in situations
that would corrupt later data.  Non-empty initialization of zero-length
arrays is now treated like any case where there are more initializer
elements than the array holds, in that a suitable warning about "excess
elements in array" is given, and the excess elements (all of them, in
this case) are ignored.

Instead GCC allows static initialization of flexible array members.
This is equivalent to defining a new structure containing the original
structure followed by an array of sufficient size to contain the data.
I.e. in the following, f1 is constructed as if it were declared
like f2.

     struct f1 {
       int x; int y[];
     } f1 = { 1, { 2, 3, 4 } };

     struct f2 {
       struct f1 f1; int data[3];
     } f2 = { { 1 }, { 2, 3, 4 } };

The convenience of this extension is that f1 has the desired
type, eliminating the need to consistently refer to f2.f1.

This has symmetry with normal static arrays, in that an array of
unknown size is also written with [].

Of course, this extension only makes sense if the extra data comes at
the end of a top-level object, as otherwise we would be overwriting
data at subsequent offsets.  To avoid undue complication and confusion
with initialization of deeply nested arrays, we simply disallow any
non-empty initialization except when the structure is the top-level
object.  For example:

     struct foo { int x; int y[]; };
     struct bar { struct foo z; };

     struct foo a = { 1, { 2, 3, 4 } };        // Valid.
     struct bar b = { { 1, { 2, 3, 4 } } };    // Invalid.
     struct bar c = { { 1, { } } };            // Valid.
     struct foo d[1] = { { 1 { 2, 3, 4 } } };  // Invalid.

redpajama_set_name: RedPajamaGithub


The style of transition can be controlled with set_transition_type .
These animations respect the gtk_enable_animations setting.
Returns whether the child is currently revealed.
Gets the type of animation that will be used for transitions in this.
Sets the type of animation that will be used for transitions in this.


text:
Q: Dataweave Escape Double Quote and , while reading a json and writing to csv am getting json and trying to bulk load to salesforce as a csv . But am getting errors when i do that .
Any idea how to escape the characters?
Input:
[
  {

    "Name": ".054\" X 6' ,  Guide \\ Wire2",

  }
]

dw:
%dw 2.0
output application/csv escape="",quote=""
---
payload

A: Following this Bulk API v2 Salesforce Documentation, I think the Dataweave writer configuration you need is the following one:
output application/csv quote="\"",quoteValues=true,escape="\""

redpajama_set_name: RedPajamaStackExchange


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://ofbiz.apache.org/Site-Conf" xsi:schemaLocation="http://ofbiz.apache.org/Site-Conf http://ofbiz.apache.org/dtds/site-conf.xsd">
    <description>Security Site Configuration File</description>

    <request-map uri="addProtectedViewToSecurityGroup">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="addProtectedViewToSecurityGroup"/>
        <response name="success" type="view" value="EditSecurityGroupProtectedViews"/>
        <response name="error" type="view" value="EditSecurityGroupProtectedViews"/>
    </request-map>
    <request-map uri="addSecurityPermissionToSecurityGroup">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="addSecurityPermissionToSecurityGroup"/>
        <response name="success" type="view" value="EditSecurityGroupPermissions"/>
        <response name="error" type="view" value="EditSecurityGroupPermissions"/>
    </request-map>
    <request-map uri="addUserLoginToSecurityGroup">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="addUserLoginToSecurityGroup"/>
        <response name="success" type="view" value="EditSecurityGroupUserLogins"/>
        <response name="error" type="view" value="EditSecurityGroupUserLogins"/>
    </request-map>
    <request-map uri="createnewlogin">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="createnewlogin" save-current-view="true"/>
    </request-map>
    <request-map uri="CreateNewSecurityGroup">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="CreateNewSecurityGroup"/>
    </request-map>
    <request-map uri="createSecurityGroup">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="createSecurityGroup"/>
        <response name="success" type="view" value="EditSecurityGroup"/>
        <response name="error" type="view" value="EditSecurityGroup"/>
    </request-map>
    <request-map uri="createUserLogin">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="createUserLogin"/>
        <response name="success" type="view" value="EditUserLogin"/>
        <response name="error" type="view" value="createnewlogin"/>
    </request-map>
    <request-map uri="EditCertIssuerProvisions">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="CertIssuerProvisions"/>
    </request-map>
    <request-map uri="editlogin">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="EditUserLogin"/>
    </request-map>
    <request-map uri="EditSecurityGroup">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="EditSecurityGroup"/>
    </request-map>
    <request-map uri="EditSecurityGroupPermissions">
        <security https="true" auth="true" />
        <response name="success" type="view" value="EditSecurityGroupPermissions" />
    </request-map>
    <request-map uri="EditSecurityGroupProtectedViews">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="EditSecurityGroupProtectedViews"/>
    </request-map>
    <request-map uri="EditSecurityGroupUserLogins">
        <security https="true" auth="true" />
        <response name="success" type="view" value="EditSecurityGroupUserLogins" />
    </request-map>
    <request-map uri="EditUserLoginSecurityGroups">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="EditUserLoginSecurityGroups"/>
    </request-map>
    <request-map uri="FindSecurityGroup">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="FindSecurityGroup"/>
    </request-map>
    <request-map uri="FindUserLogin">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="FindUserLogin"/>
    </request-map>
    <request-map uri="importIssuerProvision">
        <security https="true" auth="true"/>
        <event type="service" invoke="importIssuerProvision"/>
        <response name="success" type="view" value="CertIssuerProvisions"/>
        <response name="error" type="view" value="ViewCertificate"/>
    </request-map>
    <request-map uri="LookupUserLogin">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="LookupUserLogin"/>
    </request-map>
    <request-map uri="removeProtectedViewFromSecurityGroup">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="removeProtectedViewFromSecurityGroup"/>
        <response name="success" type="view" value="EditSecurityGroupProtectedViews"/>
        <response name="error" type="view" value="EditSecurityGroupProtectedViews"/>
    </request-map>
    <request-map uri="removeSecurityPermissionFromSecurityGroup">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="removeSecurityPermissionFromSecurityGroup"/>
        <response name="success" type="view" value="EditSecurityGroupPermissions"/>
        <response name="error" type="view" value="EditSecurityGroupPermissions"/>
    </request-map>
    <request-map uri="removeUserLoginFromSecurityGroup">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="updateUserLoginToSecurityGroup"/>
        <response name="success" type="view" value="EditSecurityGroupUserLogins"/>
        <response name="error" type="view" value="EditSecurityGroupUserLogins"/>
    </request-map>
    <request-map uri="updatePassword">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="updatePassword"/>
        <response name="success" type="view" value="EditUserLogin"/>
        <response name="error" type="view" value="EditUserLogin"/>
    </request-map>
    <request-map uri="updateProtectedViewToSecurityGroup">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="updateProtectedViewToSecurityGroup"/>
        <response name="success" type="view" value="EditSecurityGroupProtectedViews"/>
        <response name="error" type="view" value="EditSecurityGroupProtectedViews"/>
    </request-map>
    <request-map uri="updateSecurityGroup">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="updateSecurityGroup"/>
        <response name="success" type="view" value="EditSecurityGroup"/>
        <response name="error" type="view" value="EditSecurityGroup"/>
    </request-map>
    <request-map uri="updateUserLoginSecurity">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="updateUserLoginSecurity"/>
        <response name="success" type="view" value="EditUserLogin"/>
        <response name="error" type="view" value="EditUserLogin"/>
    </request-map>
    <request-map uri="updateUserLoginToSecurityGroup">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="updateUserLoginToSecurityGroup"/>
        <response name="success" type="view" value="EditSecurityGroupUserLogins"/>
        <response name="error" type="view" value="EditSecurityGroupUserLogins"/>
    </request-map>
    <request-map uri="userLogin_addUserLoginToSecurityGroup">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="addUserLoginToSecurityGroup"/>
        <response name="success" type="view" value="EditUserLoginSecurityGroups"/>
        <response name="error" type="view" value="EditUserLoginSecurityGroups"/>
    </request-map>
    <request-map uri="userLogin_removeUserLoginFromSecurityGroup">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="updateUserLoginToSecurityGroup"/>
        <response name="success" type="view" value="EditUserLoginSecurityGroups"/>
        <response name="error" type="view" value="EditUserLoginSecurityGroups"/>
    </request-map>
    <request-map uri="userLogin_updateUserLoginToSecurityGroup">
        <security https="true" auth="true"/>
        <event type="service" path="" invoke="updateUserLoginToSecurityGroup"/>
        <response name="success" type="view" value="EditUserLoginSecurityGroups"/>
        <response name="error" type="view" value="EditUserLoginSecurityGroups"/>
    </request-map>
    <request-map uri="ViewCertificate">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="ViewCertificate"/>
    </request-map>

    <view-map name="CertIssuerProvisions" type="screen" page="component://common/widget/SecurityScreens.xml#EditX509IssuerProvisions"/>
    <view-map name="createnewlogin" type="screen" page="component://common/widget/SecurityScreens.xml#CreateUserLogin"/>
    <view-map name="CreateNewSecurityGroup" type="screen" page="component://common/widget/SecurityScreens.xml#CreateSecurityGroup"/>
    <view-map name="EditSecurityGroup" type="screen" page="component://common/widget/SecurityScreens.xml#EditSecurityGroup"/>
    <view-map name="EditSecurityGroupPermissions" type="screen" page="component://common/widget/SecurityScreens.xml#EditSecurityGroupPermissions"/>
    <view-map name="EditSecurityGroupProtectedViews" type="screen" page="component://common/widget/SecurityScreens.xml#EditSecurityGroupProtectedViews"/>
    <view-map name="EditSecurityGroupUserLogins" type="screen" page="component://common/widget/SecurityScreens.xml#EditSecurityGroupUserLogins"/>
    <view-map name="EditUserLogin" type="screen" page="component://common/widget/SecurityScreens.xml#EditUserLogin"/>
    <view-map name="EditUserLoginSecurityGroups" type="screen" page="component://common/widget/SecurityScreens.xml#EditUserLoginSecurityGroups"/>
    <view-map name="FindSecurityGroup" type="screen" page="component://common/widget/SecurityScreens.xml#FindSecurityGroup"/>
    <view-map name="FindUserLogin" type="screen" page="component://common/widget/SecurityScreens.xml#FindUserLogin"/>
    <view-map name="LookupUserLogin" type="screen" page="component://common/widget/LookupScreens.xml#LookupUserLogin"/>
    <view-map name="ViewCertificate" type="screen" page="component://common/widget/SecurityScreens.xml#ViewCertificate"/>

</site-conf>