Many microbiome studies have matched-pair or matched-set designs, in which data naturally cluster into sets, with some within-set variation in traits of interest. Statistical methods help us make sense of these data, testing hypotheses at the community or operational taxonomic unit (OTU) level. Now, researchers present a new strategy for analyzing matched-set microbial data. The method can be used with both PERMANOVA, a commonly used distance-based method for testing hypotheses at the community level, and the linear decomposition model (LDM), which unifies the community-level and OTU-level tests into one framework. An indicator variable for each set is included as a covariate to constrain comparisons between samples within a set. Simulations using this method showed that the strategy outperformed alternative strategies in a wide range of scenarios, and the flexibility of these methods to allow discrete or continuous traits or interactions to be tested was illustrated with analysis of two real datasets. This highlights the potential of the PERMANOVA and LDM strategies for analyzing the complex data structures that occur frequently in microbiome studies.