HarmonicWtdMean:
Block-Specific Mean Differences Weighted by Harmonic Mean Sample Size
Description
Calculates the weighted average of the block-specific differences of means, where the weights are proportional to the harmonic mean cluster size in the block (Donner and Klar, 1993; Bowers, Fredrickson and Hansen, 2010). The result is intended to be used as a test statistic in a permutation test.
Usage
HarmonicWtdMean(y, tr, tl, block, ...)
Arguments
y
Response variable (vector)
tr
Treatment variable (vector)
tl
The level of treatment variable (e.g., "treated" or 1) that indicates treated observations
block
Blocking/stratification variable (vector)
...
Additional arguments (included for compatibility but ignored)
References
Bowers, Jake, Mark Fredrickson and Ben Hansen. 2010. ``RItools: Randomization Inference Tools.'' R package version 0.1-11. http://www.jakebowers.org/RItools.html.
Donner, Allan and Neil Klar. 1993. ``Confidence Interval Construction for Effect Measures Arising From Cluster Randomization Trials.'' Journal of Clinical Epidemiology 46(2):123-131.