[R] clustered data in wilcox_test

Devin M. Caughey devin.caughey at gmail.com
Tue Oct 12 07:48:21 CEST 2010

Dear all,

I have R code of the following form:

wilcox_test(categoricalResponse ~ binaryTreatment | matchedCluster)

The data consist of 11 matched pairs of clusters, each of which contains a variable number of units on which the response variable is measured. Treatment, however, was assigned at the level of the cluster. First, is there any way to make `wilcox_test' calculate p-value based on the permutation distribution of the _clusters_, rather than treating all units in each stratum as independent? Second, does the function `wilcox_test' (and similar functions like `surv_test') in the `coin' package weights the linear statistic in each stratum by 1/(N_s + 1), where N_s is the number of observations in the stratum, as is suggested by van Elteren (1960)? 

Thank you for your assistance.


Devin M. Caughey
PhD Candidate, Political Science
UC Berkeley, 210 Barrows Hall, Berkeley, CA 94720-1950
caughey at berkeley.edu

More information about the R-help mailing list