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

ancom model equation #275

Open
DennisBeest opened this issue Jul 24, 2024 · 1 comment
Open

ancom model equation #275

DennisBeest opened this issue Jul 24, 2024 · 1 comment
Labels
invalid This doesn't seem right

Comments

@DennisBeest
Copy link

Looking at your ancom code (and the example from the help file) I noticed you set up your model equation as this:

tformula = formula(paste("x ~", main_var, "+", adj_formula), sep = " ")

which means the main variable is in first place in the equation. Later in the code you do an anova with this. The default with anova(lm(..)) is a type 1 anova, which means the variables are added sequentially.

What this means is that in the currrent setup the SS/p-value you get for main_var is not adjusted for adj_formula.

@Maggie8888
Copy link
Collaborator

Please be more specific for your question. Are you wondering the p-value for main effect is not considering adjustment for other covariables in the model? And which function are you referring to?

@Maggie8888 Maggie8888 added the invalid This doesn't seem right label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants