I need to determine if there is any relationship between two count variables. I have 60+ observations for 4 variables and I want to see if any of the pairs of these variables are significantly correlated with one another.
Mostly I use R, so forgive me if you're not familiar.
I have been using the cor(...,method="pearson")
and cor.test()
functions to test each pair, but now I'm not so sure that this is the right approach/test.
Would a non-linear regression like glm(...,family="poisson")
be more appropriate?
I started thinking like this because when I looked at a histogram of the counts across my observations, I noticed that there seemed to be a slight tendency for the pink and green variables to go up and down to together.
I produced a scatter plot of each of the variables plotted against each of the other variables. I used the tests mention above to try and quantify this relationship and to test weather it was real or just noise.
data.frame
, and then runcor()
. For a simple test to see if correlations EXIST, you could use something likecortest.bartlett(my.correlation.matrix, n=60)
, but that doesn't help you find out what the relationships are. If you follow @gung 's answer below, you could look at the correlation matrix to gather intuition about what relationships might exist, and then run a new study to investigate those suspected relationships. $\endgroup$