[R] Question about package coin
bskeller at wisc.edu
Sun May 30 21:43:56 CEST 2010
Thanks for the reply, that answers my question.
I'm actually interested in using the Welch t in a randomization model framework where the variance heterogeneity is introduced by the treatment effect and is not present under the null hypothesis of no differential treatment effect. In other words, the test would be valid because exchangeability is satisfied by random assignment of experimental units to treatments.
Much thanks to you and your colleagues for providing and maintaining this fantastic package.
On 05/30/10, Achim Zeileis <Achim.Zeileis at uibk.ac.at> wrote:
> On Sat, 29 May 2010, Bryan Keller wrote:
> >Anyone know if coin can run a permutation test based on a (user-defined) statistic other than the mean difference? The function independence_test does the permutation t-test via difference in means.
> ...by default, that is.
> >I'm wondering if it's possible to use independence_test to run a permutation test for some other statistic than the difference in means.
> >For example, I'd like to run a permutation test using Welch's t instead of the difference in means.
> >The help for independence_test reveals that "teststat" is an argument which allows for specification of standardized scalar test statistic, a maximum type statistic, or a quadratic form. I cannot, however, figure out if it is possible to specify how the statistic should be calculated by, for example, supplying a function.
> Have you considered reading the references mentioned in the documentation.
> I suggest you start with
> vignette("LegoCondInf", package = "coin")
> which essentially is the "The American Statistician" paper mentioned in the help pages.
> The general framework is that the user can specify data transformations for which an independence test is computed. Depending on the data transformation, this can be a t test, chi-squared test, Wilcoxon test, Kruskal-Wallis test, and many many more.
> Furthermore, note that the null hypothesis is always permutation invariance. Hence, the Welch test does not fit into this framework because under the null it assumes same means but with potentially different variances, which is not invariant with respect to permutations.
> Therefore, the default t statistic in independence_test() computes a mean difference standardized by the one-sample standard deviation (with only a single mean!). This is neither the pooled two-sample standard deviation (with two means) that t.test(..., var.equal = TRUE) uses nor the two-sample standard deviation (with two means and two standard deviations) of the Welch test.
Bryan Keller, Doctoral Student/Project Assistant
Educational Psychology - Quantitative Methods
The University of Wisconsin - Madison
More information about the R-help