Let us consider variables $X_1,\dots,X_k$. They are highly dependent. We want to perform some test for any pair $(X_i,Y)$ and imply proper multiple-comparisons correction.

As i understand, Westfall & Young or minP/maxT corrections should be efficient in this task. But i can't find any general implementation in R. And code it from scratch is hard and dangerous, as for me.

Is there any implementation of this methods or any alternatives?

Edit 1: Practical example.

Y=rnorm(8,mean = 3)*X1+rnorm(8)



p.adjust(p_vec,method = "holm")

Holm's correction is too strict for such dependent tests. I wanted to permute Y and perform Westfall & Young correction.

  • $\begingroup$ I'm not quite clear on which hypotheses you're actually trying to test given your data. Do you have multiple observations for each variable $X_i$ and $Y$? More generally, the R library multtest provides methods for adjusting p-values using the step-down maxT and minP procedures of Westfall & Young. Have you already taken a look at multtest? $\endgroup$ – Maurits Evers Feb 11 at 13:51
  • $\begingroup$ @MauritsEvers, I have, say, N patients with $X_1, \dots,X_k$ and $Y$ measured for every patient. As i understood, multtest can only be used if $X_i$ is continuous and $Y$ is binary. In my case $X_i$ is binary, $Y$ is continuous and i want to perform Wilcoxon test with resampling of $Y$ ranks. Also im interested in case when $Y$ is binary and we use Exact Fisher's test. $\endgroup$ – Kess Feb 11 at 16:21
  • $\begingroup$ I'm sorry but I'm still confused about your data. I assume you have multiple measurements for every variable $X_i$ for every patient? Otherwise I'm not clear on how you'd like to "perform some test for any pair $(X_i, Y)$". Perhaps it might help if you were to provide some sample data and code (since this post has an r code tag) that shows what test(s) you'd like to perform on which (subset of) your data. I'm also wondering whether modelling Y directly as a function of the X_is wouldn't be more sensible. This might avoid the whole multiple comparison issue altogether. $\endgroup$ – Maurits Evers Feb 12 at 1:17
  • $\begingroup$ @MauritsEvers I apologize for such unclear data. I meant pairs of random variables $(X_i,Y),\quad i=1\dots k$ . I added a code example to the post. $\endgroup$ – Kess Feb 12 at 13:04
  • $\begingroup$ I'm very confused about your data and what you're trying to do; in your post you state that you want to perform pairwise tests (Wilcoxon rank tests in your case) of random variables $(X_i, Y)$ where $X_i$ is binary and $Y$ is continuous; but in your code you perform tests on disjoint subsets of $Y$. $\endgroup$ – Maurits Evers 2 days ago

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.