I want to run multiple chi-square tests (or logistic regressions) and adjust for multiple comparisons. so basically, i want to run pairwise comparison of proportions.

I would want to run either chi-square analyses with Bonferroni adjustment or logistic models (GLM) with scheme adjustment... However, when I search for the syntax, i only find codes for pairewise comparison for linear models (i.e., ANOVAs with adjustment)... Would anyone know the code for categorical variables? For example, how do I run chi-square analyses with bonferroni adjustment in STATA?

Thanks so much in advance!