Skip to main content
edited title
Link
Mat D.
  • 101
  • 3

Which kind of Significance Test for Correlation Analysis on Population Proportions?

Source Link
Mat D.
  • 101
  • 3

Significance Test for Correlation Analysis on Population Proportions

I want to show if a population of virus-hosts and viruses have the same proportion on certain characteristics.

Background-info

Let's say there are 5 different "versions" of a protein (protA, protB, ...) of interest which can be produced by both, viruses and their host-organisms. Now, I have a large population of virus-hosts and I perfom some specific experiments to measure which of those 5 protein "versions" are present in the viruses and the hosts.

set.seed(123)
df <- data.frame(proteinX.version = LETTERS[1:5],
                 virus.host = round(rnorm(5,50,20),0),
                 virus = round(rnorm(5,50,20),0))
df

I'm only interested in the fraction of each version over all possible proteins versions for virus-hosts and viruses. Which results in something like that:

df$virus.host <- df$virus.host/sum(df$virus.host)
df$virus <- df$virus/sum(df$virus)

df

Problem

Finally I'd like to know if the fraction of each protein "version" correlates between viruses and their hosts. Or in other words, do viruses and their hosts produce the same amount of each protein version? i.e. Viruses produce 1:2:3:4:5 and virus-hosts 0.5:1:1.5:2:2.5 of protein version A:B:C:D:E respectively. How can I test if they significantly correlate?

What I tried

I did a comparison of population proportions on the fractions and the real counts. Where the fractions always lead to non-significance and the count data always to significant results.

prop.test(as.matrix(df[,-1]))

However, I'm not quiet sure if this is the correct test. As far as I understood, it would need dichotomous variables...