Tsagris 2018 - Dirichlet Regression with Zeros - Examples and Simulation Results

Summary

Four real data sets and a 6 x 3 x 5 x 1000 simulation compare simple ZADR, ZADR, Aitchison regression (zeros imputed with robCompositions) and the Kent model. Aitchison is slightly better on two real sets, ZADR on the others; with many injected zeros ZADR wins, and in simulation the proportion of runs with lower KL goes to 1 as grows.

Overview

Performance metrics (Eq. 12), computed on the unimputed observed data: Kullback-Leibler divergence (with ) and the squared norm .

Main Content

4.1 Florida 2000 presidential election (Smith 2002)

67 counties, 10 candidates, 8 demographic covariates; 23 counties had at least one zero (about 5% of values).

ModelKL
simple ZADR0.8440.519
Aitchison (imputed)0.6480.513
Dirichlet-multinomial0.6380.512

Converted to expected vote counts, the distance slightly favours simple ZADR. Count/frequency data can be analysed by compositional regressions with zeros handled.

4.2 Forensic glass (n = 214, six glass types, D = 8, 392 zeros = 22.9%)

Zeros: Mg 19.63%, K 14.02%, Ba 82.24%, Fe 67.29%; Na, Al, Si, Ca have none. Only covariate: refractive index. KL 4.02 (simple ZADR) vs 3.95 (Aitchison); 0.142 vs 0.137. Wald tests: all coefficients significant for Aitchison except Si; same for ZADR plus Fe non-significant. (Table 2 gives coefficients such as Mg intercept -1.394 (0.018) vs -1.947 (0.081).)

4.3 Foraminifera (Aitchison 2003; 30 depths, 4 components, 5 vectors with zeros)

Covariate depth; Triloba is the reference. Simple ZADR coefficients (Table 3):

ResponseConstantSlope
Obesa-1.225 (0.348)0.117 (0.131)
Pachyderma-2.392 (0.463)0.087 (0.173)
Atlantica-2.298 (0.494)-0.046 (0.193)
15.889 (2.473)

Full ZADR (Table 4): constant 3.725 (0.481), slope -0.371 (0.184). Log-likelihoods 124.040 (simple) vs 125.877 (full): no significant gain (). Aitchison coefficients (Table 5) are similar: Obesa -1.319 (0.369), 0.121 (0.140); Pachyderma -3.065 (0.755), 0.083 (0.288); Atlantica -2.596 (0.540), -0.208 (0.206).

Model (Table 6)KL
simple ZADR3.1261.065
Kent (Scealy and Welsh)3.1721.062
Aitchison (imputed)3.5561.173

4.4 Arctic lake (sand, silt, clay at 39 depths)

Four models fitted to the zero-free data, then with 2 and 4 injected zeros (Fig. 3). The Aitchison fit bends toward the two points with zeros and, with 4 zeros on low-sand points, “has lost the bulk of the data”; the ZADR models “seem not to have been affected at all”.

4.5 Simulation

Data from and from logistic-normal (diagonal with exponential entries), two covariates; , , zero rate (zeros assigned and rows re-closed; for one, two and five components respectively), 1000 replications per cell. Metric: proportion of times KL(ZADR) < KL(Aitchison). Results: for Dirichlet data it increases with and reaches 1; for logistic-normal data with likewise; for it reaches 1 for 40-50% zeros; for Dirichlet data it was 1 for all sample sizes.

Examples

Python: simulating the zero-injection experiment

import numpy as np
rng = np.random.default_rng(0)
def dirichlet_with_zeros(n, a_star, phi, pi_zero, k_zero):
    Y = rng.dirichlet(phi * a_star, size=n)
    rows = rng.random(n) < pi_zero
    for r in np.where(rows)[0]:
        idx = rng.choice(len(a_star), k_zero, replace=False)
        Y[r, idx] = 0.0
        Y[r] /= Y[r].sum()                       # re-close
    return Y
Y = dirichlet_with_zeros(200, np.array([.5, .3, .2]), 10.0, 0.3, 1)
print((Y == 0).mean(0))

Connections

Tsagris 2018 - Dirichlet Regression with Zeros - Zero Adjusted Dirichlet Regression, Greenacre 2023 - Compositional Outcome Models in PyMC, Model Validation and Interpretability - Overview (simulation-based validation, ADEMP style).

See Also

Tsagris 2018 - Dirichlet Regression with Zeros - Overview