Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test lvip_glm #3

Open
rmcminds opened this issue Jun 23, 2021 · 2 comments
Open

test lvip_glm #3

rmcminds opened this issue Jun 23, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@rmcminds
Copy link
Contributor

I've written a model that should be able to simultaneously control for and assess alpha diversity, overall beta diversity, and individual differential abundances and prevalences. I'd like to test it on a relatively simple experimental design.

@rmcminds
Copy link
Contributor Author

The basic idea is that all these things can be modeled with a relatively simple zero-inflated generalized linear model.

  • Alpha diversity is the tendency for a sample to have a greater number of taxa. When modeling prevalence with a logistic linear model, a main effect that applies to all taxa can capture this pattern. In other words, if treatment A causes all taxa to be more likely to be present, a given sample will have more taxa.

  • Beta diversity is sometimes thought of as a somewhat abstract idea that the 'composition' of samples is different. In other words, if sample A has 3 taxa, and sample B has 3 taxa, their alpha diversity might be the same, but if the three taxa have different identities, there is higher beta diversity in the set that is created by the two samples. This pattern is the aggregate of the same pattern captured by 'differential abundance' analyses, which are simply linear models that allow individual taxa to differ between treatments (which a permanova/adonis would also capture), or allowing taxa to differ between samples as 'residual variance', which could be captured by permdisp if the residual variance differs among treatments. In addition, in a zero-inflated framework, taxon-specific effects can be modeled for both the zero inflation (presence/absence) and for differential abundance. These are distinct patterns that can be separated in a linear model that are often difficult to tell apart with 'multivariate analyses'. The aggregate 'beta diversity' tests analogous to permanova and permdisp can be replaced by determining the % variance explained for each factor.

  • Differential abundance analysis and differences in prevalence can be determined by looking at the individual parameters in the above analysis.

  • I've also included phylogenetic effects, which allows you to assess alpha diversity or differential prevalence/abundance within entire phylogenetic groups, without arbitrarily collapsing taxa. I've implemented an Ornstein Uhlenbeck effect to constrain the total possible variance, which is probably more realistic.

  • I've also modified the 'zero-inflated' model to a 'low-value-inflated' model. This allows for contamination and/or relatively discrete differences in abundance between treatments.

@rmcminds
Copy link
Contributor Author

Hopefully, the idea is that you just provide a (unrarefied) count matrix, a phylogenetic tree, and a model matrix, and my scripts can take that and analyze it. Some of the summarizations and hypothesis testing will need to be done 'by hand' after the model fits.

@rmcminds rmcminds added the enhancement New feature or request label Jun 23, 2021
rmcminds pushed a commit that referenced this issue Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants