2
$\begingroup$

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.

Female1-Male1
F1-M2
F1-M3
F2-M1....etc

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?
$\endgroup$
2
  • $\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
    Commented May 18, 2011 at 21:03
  • $\begingroup$ No, each female-male pair was observed in both conditions. $\endgroup$
    – Rafe
    Commented May 18, 2011 at 21:44

3 Answers 3

3
$\begingroup$

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 
require(coin)

# 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!
str(s.data)

# 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.

$\endgroup$
1
  • 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
    Commented May 21, 2011 at 23:21
2
$\begingroup$

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

ezPerm(
    data = my_data
    , dv = .(the_dv)
    , wid = .(dyad_num)
    , within = .(sex)
    , perms = 1e3
)
$\endgroup$
1
$\begingroup$

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.

$\endgroup$

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.