I have a dataset of count data: the number of times a behaviour was performed by either of two individuals in a chamber (a focal individual and a partner), with multiple independent tests across multiple chambers. I'd like to test whether the behaviour was performed more often by the focal individual than by the partner, i.e. whether the proportion of behaviours done by the focal individual exceeds 0.5 on average across chambers. The number of times it was performed varied across chambers (from ~1 to 30).

I think one way to go about it is to use prop.test in R, specifying an expected value of 0.5 for each test. When I do this, I get this error message: 'Chi-squared approximation may be incorrect.' I suspect this is because N < 5 in some chambers.

What would be the appropriate test in this case? I've looked at fisher.test but that doesn't seem to be it.

Here's my code for the prop.test, using dummy data:

 x<-c(10, 2, 1, 1, 5, 100)
 p<-c(0.5, 0.5, 0.5, 0.5, 0.5, 0.5)
  • $\begingroup$ Isn't the prop.test a test of whether or not the given proportion is significantly different from zero? Would it be more appropriate to express the test as a contrast between the focal agent vs all others? There is a large literature on this. $\endgroup$ – Mike Hunter Sep 29 '16 at 14:45
  • $\begingroup$ I think you are testing whether the proportions differ from 0.5 whereas your scientific question was one-sided but otherwise it seems OK. $\endgroup$ – mdewey Sep 29 '16 at 17:06

Your Answer

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

Browse other questions tagged or ask your own question.