Having more than one grouping factor

47 views
Skip to first unread message

oic...@gmail.com

unread,
Nov 14, 2014, 3:30:57 PM11/14/14
to comparegr...@googlegroups.com
Hello,
I am using the compareGroups function but when I have more than one grouping factor I don't know how to write it in R or if it is possible or not. It is important since the p.overall results are different for one or two-way ANOVA. Or maybe I am wrong.
¿Someone have an answer?
Thank you very much in advance.

Isaac Subirana

unread,
Nov 19, 2014, 4:06:45 AM11/19/14
to comparegr...@googlegroups.com

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.

oic...@gmail.com

unread,
Nov 19, 2014, 12:29:11 PM11/19/14
to comparegr...@googlegroups.com
I understand but, when you are working with epidemiological data it is very usual to have different factors such as gender, stage of life or taking pills or not por example. Thus, I think it could be an interesting development in compareGroups package to do in the future.

Thank you very much for your response,

Isaac Subirana

unread,
Nov 20, 2014, 4:19:03 AM11/20/14
to comparegr...@googlegroups.com

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.

Reply all
Reply to author
Forward
0 new messages