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) n<-c(15,3,2,1,5,105) p<-c(0.5, 0.5, 0.5, 0.5, 0.5, 0.5) test<-prop.test(x,n,p)