[R] Survey Data - comparing multiple groups
Mavra Ahmed
m@vz@@hmed @end|ng |rom utoronto@c@
Fri Jul 26 03:23:59 CEST 2019
Hi Everyone,
I am trying to assess whether the mean of carbohydrate intake (dependent variable = continuous) is significantly different between five groups (groups = people categorized into five different groups) (independent variable= categorical). This is survey data with replicates and therefore I have changed the structure of the data to svyrepdesign.
I have ran Kruskal Wallis as follows but get the following error:
svyranktest(CARB ~ group, df, test=c("KruskalWallis"))
> Error in if (this.n == 1 && !this.certain) { :
missing value where TRUE/FALSE needed
I also ran svyglm but am unable to conduct this test to look at comparisons between groups:
summary(svyglm(CARB ~ group, design=df, family=gaussian))
I would like to be able to get p-values between the groups and be able to adjust for multiple comparisons and would appreciate if someone can guide me.
I appreciate your help.
Thanks,
Mav
[[alternative HTML version deleted]]
More information about the R-help
mailing list