1
$\begingroup$

I have six vectors, each of length say $n$ which is >= 100. The vector entries correspond to a measurement from a certain experiment on $n$ individuals. Each index in the vectors corresponds to one of these individuals. All these individuals were tested on six different days, giving me six vectors. First three sets of measurements were done after feeding the individuals with A and later three after feeding them with B. So, my six vectors can be labelled as A1, A2, A3, B1, B2, B3. Ideally, A1, A2 and A3 should have been exactly the same but it being a real world, some differences exist, likely because of measurement errors. Same goes for B1, B2 and B3.

I need to compare the conditions A and B for significant differences in center of their distributions. Please note that this is a genetics study and any concerns related to drug trial or toxic exposure does not apply in my case. I am saying that because in past, on one of my questions, one of the answers just raised a lot of concerns suggesting that I should not do these kind of comparisons for drug trial and stuff because of so and so. That question was never adequately answered. The story with "individuals" and "feeding" in first paragraph is hypothetical and meant only for simplicity of problem statement.

All readers can take an abstract viewpoint such as follows. Compare two sets of vectors, namely, set 1 being A1, A2 and A3 and set 2 being B1, B2 and B3. The constraints on this problem are:

  1. There is a natural pairing between indices in all vectors, i.e., measurement $i$ in A1, corresponds to measurement $i$ in all other vectors. Hence, there is need to account for this pairing when comparing the two conditions.

  2. There is no correspondence between A1 and B1 or between A2 and B2 or between A3 and B3.

  3. Any of the vectors may not be assumed to follow Gaussian distribution.

Also, the alternative hypothesis is that measurements in A are greater than in B.

I took mean of the vectors A1, A2 and A3 and compared it to mean of the vectors B1, B2 and B3 using a paired Wilcoxon-Mann-Whitney test specifying the said alternative hypothesis in R. But this approach does not account for the noise within sets A or B. As an alternative, I created a new vector A of length 9n, by concatenating A1, A2 and A3 with each repeated three times, i.e. A is concatenation of A1, A1, A1, A2, A2, A2, A3, A3, A3. Similarly, B was created as concatenation of B1, B2, B3, B1, B2, B3, B1, B2, B3. Then I performed paired Wilcoxon-Mann-Whitney test on A and B again specifying the said alternative hypothesis in R. I took this latter approach because I wanted to keep the measurement noise in picture but could not pair A1 with B1 only and A2 with B2 only, etc due to constraint 2. Hence, I did all possible pairings. However, I am wondering if there are any considerations that I am missing in this approach. It sure does not sound like a standard approach to me.

Any suggestions? Approaches accepted as standard and with references are preferred.

$\endgroup$
1
  • $\begingroup$ It looks like a standard analysis of variance layout. Have you considered that? $\endgroup$
    – mdewey
    Commented Jan 14, 2017 at 15:33

1 Answer 1

1
$\begingroup$

First I describe the situation as I understood it. You have measurements (not assumed to have a normal or any other distribution) on $n$ individuals, six observations on each individual, on two different conditions $A,B$. We can write this as $$ y_{ijA}, y_{ijB} $$ for $i=1,2,\dotsc,n$, $j=1,2,3$. This could be modelled as an ANOVA with one random and one fixed factor, we can write a linear model like $$ y_{ijk} = \mu + \eta_i + \beta I(\text{$k=A$}) +\epsilon_{ijk} $$ This is one way of taking care of (that is, modeling) the dependence of the observations pertaining to the same individual. Here $\eta_i$ is a random effect for each individual and $\epsilon_{ijk}$ is the error term. (It might need some extra restrictions for identifiability). This could be estimated with standard software for linear mixed models, like lme4 in R. I don't know about nonparametric tests for such models ... but you could use bootstrapping, maybe, or bayesian methods. For references, look at any book about mixed models, if you are using R then maybe: Bates it is accessible and very good.

$\endgroup$
1
  • 1
    $\begingroup$ Thanks for the answer. I did discover linear mixed models, read the theory and used lme4 for my problem. It worked. $\endgroup$
    – Mr K
    Commented May 8, 2017 at 4:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.