By now, it is not possible to compare groups for two variables in the way that it is done in a 2-Factor ANOVA where you can test the significance for each factor separately as well as interaction term.
Although it could be an interesting option to be considered for future versions, compareGroups it's meant to perform crude comparisons. Therefore, it would be not trivial to implement 2-way ANOVA models for continuous normal and non-normal and categorical variables in the compareGroups context.
Regards,
Isaac.
Thank you very much for your response,
We are agree that in many epidemiological studies, crude descriptives are not useful, but adjusted means or proportions by age, gender or other confounders are much more appropriate. However, this implies to fit model like multiple linear regression, logistic regression, Cox, etc. depending on whether the variable is continuous, binary, or time-to-event, etc. Unlike a t-test or a Kruskal-Wallis test, etc., when modelling, much more assumptions (such as linearity, homoscedasticity, normality, etc.) should be validated. This is not trivial to do it automatically and, therefore, it could be a problem when dealing with lots of variables.
For this reason, we have not implemented it by now. But we will consider it for future versions since we have received this request from other users as well.
Thank you very much for your suggestions.
Isaac.