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
Hi, I am using emmeans_test for post-hoc analysis, But got the error like "Nonconforming number of contrast coefficients", The covariate(sex) variable have been transfomed to numeric variable. But It doesn't work and made me feel confused
I was working with glycome data and facing the same problem as you had. When setting "age" as the covariate, things went well. But when setting "sex" as the covariate, I got the same "Nonconforming number of contrast coefficients" error. After a few experiments I decide to use the emmeans package to perform the post-hoc test manually. Here is my solution for your reference:
>data# A tibble: 693 × 5samplegroupsexagelog_value<chr><fct><chr><dbl><dbl>1S1HCCM6714.52S10CHBF5113.33S100CHBM3213.44S101CHBM4413.35S102HCF2712.86S103CHBF2313.47S104HCCM4914.28S105CHBM4614.19S108HCCM7213.810S109HCM5614.5# ℹ 683 more rows
In my case, "log_value" is the dependent variable, "group" is the independent variable, "sex" and "age" are the covariates.
If you have multiple dependent variables like I did (I had dozens of glycans to test), use nest from tidyr and compute the results sequentially in mutate with map, and finally unnest.
Hi, I am using emmeans_test for post-hoc analysis, But got the error like "Nonconforming number of contrast coefficients", The covariate(sex) variable have been transfomed to numeric variable. But It doesn't work and made me feel confused
And What is the way of perfomring multi covariates? covariates1 + covariates2; or c("covariates1","covariates2")?
Thanks!
The text was updated successfully, but these errors were encountered: