I have a data set consisting of interactions between male-female dyads within a group in two conditions. The values range from -1 to 1 and indicate how responsible the female was for maintaining the relationship (Hinde's index). What I want to see is if the female responsibility changes in the two conditions. My understanding is that the Wilcoxon test is inappropriate because I have both paired and repeated measurements: each individual is part of several dyads.


My other option was to run a permutation test, and I've been searching for one in R (I'm not conversant enough with R to create one myself), but so far the only ones I've found want my data to be integers, which is most definitely not the case.

So I suppose my two questions are

  1. Am I even on the right track here or should I be looking for a different test?
  2. Can anybody suggest a permutation test that can deal with decimal places?
  • $\begingroup$ Are you saying that, say, F1-M2 was observed in condition "A" but not in condition "B" and that perhaps F1-M3 was observed in condition "B"? That is, each female should have been observed in both conditions but perhaps was paired with different sets of males in those two conditions? $\endgroup$ – whuber May 18 '11 at 21:03
  • $\begingroup$ No, each female-male pair was observed in both conditions. $\endgroup$ – Rafe May 18 '11 at 21:44

There is the possibility of using the coin package for this type of stuff. See its webpage and the accepted answer to this question.

An implementation for this type of stuff would be the following.

#load the package 

# Some toy data:
s.data <- data.frame(dyad = c("F1-M1", "F1-M2","F2-M1","F2-M2"), condition = c(rep("A", 4), rep("B", 4)), dv = runif(8,0,1)) 

# Make sure the factors are really factors!

# here goes the permutation test. 
oneway_test(dv ~ condition | dyad, distribution = approximate(B=10000), data = s.data)

(Note that you need to use an high number for B in your real example)

Furthermore, you could also use a paired t.test. I don't see any reasons against it:

t.test(subset(s.data, condition == "A", "dv", drop = TRUE), subset(s.data, condition == "B", "dv", drop = TRUE), paired = TRUE)

I think there are is one import thing you haven't discussed so far: With this implementation you would have controlled for the dyads, but not for the individuals (e.g., F1, independent of her male interaction partner). This is a serious threat to your analysis.
I know that there is a bunch of stuff an dyad analyses in psychology and related fields. Unfortunately I cannot give you a real pointer. But you should definitely check this stuff out before finishing your analyses. A quick search on rseek.org returns at least a package called dyad and this webpage.

| cite | improve this answer | |
  • 1
    $\begingroup$ Unfortunately, most of the dyad stuff assumes independent dyads where each partner is part of only one dyad. But thanks for the link to that site and its info. $\endgroup$ – Rafe May 21 '11 at 23:21

Check out the ezPerm function from the ez package for R. For example, assuming your data is in "long format" (see the reshape2 package):

    data = my_data
    , dv = .(the_dv)
    , wid = .(dyad_num)
    , within = .(sex)
    , perms = 1e3
| cite | improve this answer | |

Since you say each pair was observed in both conditions, you can use the basic trick of the paired t-test: subtract the values for the same pair in both conditions and then test for this to be zero (or if that's more relevant for this kind of measure: divide them and test for this to be 1).

At the least, this reduces the complexity of your problem.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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