[R] Survey Data - comparing multiple groups

Abby Spurdle @purd|e@@ @end|ng |rom gm@||@com
Sun Jul 28 03:39:49 CEST 2019


> 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 did convert my df into a svrepdesign object as follows:
> > df<-svrepdesign (data=df1, scale=1, repweights = df1[, 496:995],
type="BRR", combined.weights=TRUE, weight=~WTS_P, na.rm=TRUE)
>  therefore, I have called "df" as a svrepdesign however, from the survey
package, the svyranktest is shown  with svydesign only and not with
svrepdesign. I could consider using other tests such as svyglm but am also
having issues with it.

This is outside my area.
However, as no one else as responded, I'll offer some more comments.

Firstly, I'm doubtful the Kruskal Wallis test will give you pairwise
p-values.
There are other tests for this.
It's also possible to create a matrix of p-values, using an arbitrary test,
and then use a correction method.
However, I recommend caution with this.

Secondly, I don't know if the svyranktest() function will work with the
svrepdesign object or not.
However, if not, I would assume that other functions in the package would
work.

Either way, I'm wondering if you've created the svrepdesign object
correctly.
In particular, "weight=~WTS_P" would assign a formula to weights, probably,
which doesn't sound right.
And "repweights = df1[, 496:995]" looks questionable, because one, is has
hundreds of columns, and two, you've already given that data in the first
argument.

	[[alternative HTML version deleted]]



More information about the R-help mailing list