# Testing multiple differences via symmetric hierarchical Dirichlet processes

**YoungStatS**, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

## Testing differences: from ANOVA to BNP

Detecting and quantifying differences between groups is a problem of crucial significance across various fields, often addressed by practitioners using standard analysis of variance (ANOVA). However, ANOVA is subject to several well-known limitations. It primarily detects differences only in group means, assumes homogeneity within each group based on a normality assumption, and necessitates corrections for multiple testing when applied to multiple groups or responses.

Bayesian nonparametric approaches offer effective tools to address these limitations. On one hand, the Bayesian method effortlessly handles the challenge of multiple comparisons. On the other hand, the nonparametric approach allows for the relaxation of distributional assumptions, enabling the detection of differences that extend beyond means. Starting from the innovative work of Rodríguez, Dunson, and Gelfand (2008), which introduced the Nested Dirichlet Process, a growing literature on Bayesian nonparametric (BNP) methods for comparing differences in distribution among multiple groups has emerged in recent years (see, for instance, Camerlenghi et al. 2019; Christensen and Ma 2020; Beraha, Guglielmi, and Quintana 2021; Denti et al. 2021; Lijoi, Prünster, and Rebaudo 2023; Balocchi et al. 2023). However, these methods allocate limited attention to the multiple testing of many responses. Moreover, they tend to exhibit lower power compared to methods focusing solely on differences in means, especially when dealing with small sample sizes. Roughly speaking, this discrepancy may be attributed to the fact that assessing differences in distribution requires more information from the data in comparison to assessing differences in mean alone. Consequently, this approach tends to result in more conservative model selection procedures. Nevertheless, it remains evident that when two distributions possess different means, they are inherently distinct.

## Testing differences using symmetric hierarchical Dirichlet processes

In Franzolini, Lijoi, and Prünster (2023), we present a Bayesian nonparametric method for detecting differences across multiple groups and multiple responses. The method penalizes the multiplicity of tests performed while borrowing information across responses and groups. Furthermore, it retains the intrinsic flexibility of nonparametric models, effectively identifying differences in means even in the presence of small sample sizes. This is in contrast to alternative distribution-based clustering models, which tend to overestimate homogeneity across groups.

The central element of the model is the symmetric hierarchical Dirichlet process (s-HDP), a novel hierarchical nonparametric structure for error terms. This component offers flexibility and serves as a tool to explore the presence of unobserved factors, outliers, and effects beyond changes in locations.

To define the method, denote with

\(\cdot\) \(X_{i,j,m}\), the value of the \(m\)-th response observed for the \(i\)-th item, which belongs to the \(j\)-th group

\(\cdot\) \(\theta_{j,m}\), the unknown population-specific mean of the \(m\)-th response for the \(j\)-th group

\(\cdot\) \(\epsilon_{i,j,m}=X_{i,j,m}-\theta_{j,m}\), the error term.

### The sub-model for testing the means

For the population-specific means, the default prior proposed by Franzolini, Lijoi, and Prünster (2023) is \[\begin{equation} \label{eq2} \begin{aligned} \theta_{j,m}\mid \tilde p_m &\overset{iid}{\sim} \tilde p_m \qquad &j=1,\ldots,J \\ \tilde p_m\mid\omega &\overset{iid}{\sim}\mbox{DP}(\omega,G_{m})\qquad& m=1,\ldots,M \\ \omega &\sim p_\omega& \end{aligned} \end{equation}\] where \(J\) is the total number of groups, \(M\) is the total number of responses, DP\((\omega,G_m)\) denotes the Dirichlet process (Ferguson 1973) with concentration parameter \(\omega\) and non-atomic baseline probability measure \(G_m\), and \(p_{\omega}\) is a probability measure on \(\mathbb{R}^+\).

Nonetheless, alternative priors can be employed at this level of the model, provided that two minimal crucial characteristics are satisfied:

\((1)\) The prior must assign a positive probability to all hypotheses we aim to test. This means that if we are interested in testing the difference between group \(j\) and group \(k\) for response \(m\), the prior should assign a positive probability to both \(\theta_{jm}=\theta_{km}\) and \(\theta_{jm}\neq\theta_{km}\).

\((2)\) The prior probabilities of the differences we aim to test, e.g. \(\theta_{jm}\neq\theta_{km}\), must be dependent in a way that, as the number of groups \(J\) and/or the number of responses \(M\) increases, the prior odds change in favor of less complex models. Thus, penalizing for multiplicity.

### The sub-model for checking the error terms

The model for the error terms is a s-HDP mixture, meaning that the likelihood of the error terms is a mixture with Gaussian kernel that may vary across responses and groups

\[\begin{equation} \label{error} \epsilon_{i,j,m}\,|\,\tilde q_{jm} \overset{ind}{\sim} \int \mathcal{N}(\xi,\sigma^2) \text{d}\tilde q_{jm} (\xi, \sigma^2) \end{equation}\] and the prior for the mixing measure is defined by \[\begin{equation} \label{eq:s-hdp_def} \begin{split} \tilde q_{j,m}\mid\gamma_{j,m}, \, \tilde q_{0,m}\overset{ind}{\sim} \text{s-DP}(\gamma_{j,m},\tilde q_{0,m})\\ \tilde q_{0,m}\mid\alpha_{m}\overset{ind}{\sim} \text{s-DP}(\alpha_{m},P_{0,m}) \end{split} \end{equation}\] where \(\text{s-DP}(\alpha\,,\,P_0)\) denotes a symmetric Dirichlet process (Dalal 1979) with concentration parameter \(\alpha\) and non-atomic baseline probability measure \(P_0\).

The sub-model for the error terms avoids the choice of a specific parametric distribution and provides latent clustering of subjects. The clusters identified by the s-HDP mixture offer several insights: they can be interpreted as representing common unobserved factors affecting the responses (high co-clustering probability across groups), provide indications about the presence of outliers (single items with low co-clustering probabilities), and may highlight differences in distribution other than those in location (high co-clustering within groups).

In Franzolini, Lijoi, and Prünster (2023), we also provide more details about the method, a study of the random partitions induced by the model, the algorithm to estimate the model, and a series of simulation studies.

## An application to maternal hypertension disorders

Finally, in Franzolini, Lijoi, and Prünster (2023), a variation of the model is also applied to the study of hypertension disorders during pregnancy.

Hypertensive disorders during pregnancy occur in about 10% of pregnant women around the world. Although there is evidence that hypertension impacts maternal cardiac functions, the relationship between hypertension and cardiac dysfunctions is only partially understood. The study of this relationship can be framed as a joint inferential problem of detecting differences across multiple groups, each corresponding to a different hypertensive disorder diagnosis, over multiple responses provided by a collection of cardiac function indexes.

The employed model is analogous to the one described above, with the exception that certain prior probabilities for ties across locations are set to zero because they are meaningless in the specific application.

For each response variable (i.e., cardiac function index), the output of the proposed method provides a clustering of the group-means, as well as the corresponding point estimates and credible intervals, and a density estimation for each of the four groups (i.e. disorders), along with the co-clustering probability between any two subjects based on the error terms.

The figure below displays, as an example, the results for the left ventricle posterior wall thickness. From left to right, it shows the 95% credible bands and point estimates for group-specific means, the density estimate for each group, and the subject-specific co-clustering probabilities. The inference on the locations detects differences between the control group (C) and all other groups, as well as differences between the severe preeclampsia group (S) and all other groups. The co-clustering probabilities do not highlight any presence of underlying factors or additional differences between groups, but they do detect two outliers.

Considering the results on all response variable, we identify modified cardiac functions in hypertensive patients compared to healthy subjects and progressively increased alterations with the severity of the disorder suggesting that echocardiography could be included in baseline evaluation of hypertensive disorders of pregnancy.

## Bibliography

*Journal of the American Statistical Association*118 (542): 818–29.

*Bayesian Analysis*16 (4): 1187–1219.

*Bayesian Analysis*14 (4): 1303–56.

*Journal of the Royal Statistical Society Series B: Statistical Methodology*82 (1): 127–53.

*Stochastic Processes and Their Applications*9 (1): 99–107.

*Biometrics*77 (2): 622–33.

*The Annals of Statistics*1 (2): 209–30.

*The Annals of Applied Statistics*17 (1): 313–32.

*Scandinavian Journal of Statistics*50 (1): 213–34.

*Journal of the American Statistical Association*103 (483): 1131–54.

**leave a comment**for the author, please follow the link and comment on their blog:

**YoungStatS**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.