We provide aPCoA to improve data visualization in this context, enabling enhanced presentation of the effects of interest. For more details, please check our paper aPCoA: Covariate Adjusted Principal Coordinates Analysis. We also provide an R package that can adjust for multiple covariates https://cran.r-project.org/web/packages/aPCoA/index.html.
The first illustrating dataset is from a study on the effects of disturbance from a soldier crab on 56 species of meiobenthos, which are small invertebrates. Eight of the sixteen observations in the data set correspond to crab disturbances. Besides the crab disturbance, there are also four different locations in the study design, where observations from each location are comprised of two disturbed and two undisturbed ones. Here we use the Bray-Curtis dissimilarity, which is commonly used in the ecology field to visualize observations.
After loading the above dataset and the distance matrix to our shiny app, the shiny app will automatically ask you to choose the main covariate and covariate to adjust for.
After clicking the button “Create Plots”, the R shiny app will automatically produce the PCoA plots for you. The top row depicts the unadjusted PCoA colored by the main covariate and the confounding covariate, while the bottom row shows the PCoA after adjusting for the confounding covariates.