You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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?
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.
The text was updated successfully, but these errors were encountered: