0
$\begingroup$

My data look like this

trait   nobs.ctrls  nobs.cases
A            0          0
B            8          1
C           24          0
D           116         0
E            41         2
F           6          11

I have a lot more controls (ctrls) than cases (1000 vs. 50). The numbers mean that, for example, trait C is seen 24 times in the 1000 controls, but not seen at all in the cases (nobs.cases). What's the best way to test data of this type for significance? Do I need to control for N? The traits are independent.

24 times doesn't necessarily mean that it occurs in 24 of the 1000. I've done a sort of pooled analysis so I actually don't know how many people have the trait i.e. more than one may be in one person. I'm looking at SNPs in sequencing data across genes, with each "trait" really a gene.

$\endgroup$
2
  • 1
    $\begingroup$ What is your null hypothesis? What is the difference between a control and a case? $\endgroup$
    – Jonathan
    Jan 27, 2013 at 22:24
  • 1
    $\begingroup$ You very definitely need to account for N -- otherwise 20 observations of trait A in the controls would be indistinguishable from 20 observations in the cases, when as proportions these would be 20/1000 = 0.2% in controls and 20/50 = 40% in cases. If you start thinking about the data summary as taking the form of proportions, you might get some ideas about analysis options. $\endgroup$ Jan 27, 2013 at 22:51

1 Answer 1

2
$\begingroup$

Treating the traits as independent allows you to analyze this study using contingency tables for each trait. This is a 2 by 2 table illustrating the number of cases and controls for which the trait was and wasn't observed. For instance

$$ \begin{array}{ccc} & \mbox{Trait} & \mbox{No trait} \\ \mbox{Cases} & 0 & 50 \\ \mbox{Controls} & 24 & 976 \\ \end{array} $$

A summary (p-value) for the statistical significance of such a contingency table under the assumption (null hypothesis) that the odds ratio for observing the trait in cases versus controls is 1 is given by Fisher's Exact Test. The odds ratio is an appropriate summary measure for case-control data such as are obtained in the retrospective genome wide association studies for rare diseases. You should obtain such contingency tables for all A-F traits. The observed odds ratio can be computed as table elements $\frac{A \times D }{B \times C}$, for the above: (0*976)/(50*24) gives 0 suggesting the controls are infinitely more likely to have the trait (only the p-value reaffirms this assertion, since there are only a small number of cases).

EDIT: When the ratio of observed traits to number of individuals is a frequency not a proportion, it can still be sensible to use the Fisher's Exact Test. The inference is on a difference in frequencies of observed traits comparing cases to controls. Proportions are used to approximate frequencies. However, if we wanted a more general technique that would account for the count data nature of the outcome, we could use poisson regression with an offset accounting for a denominator of exposure (the differential number of cases and controls in each group).

For instance, in R we could use the following to perform inference on the same trait F:

> nsubjs <- c(50, 1000)
> ntrait <- c(11, 6)
> caseyn <- c(1, 0)


> f <- glm(ntrait ~ caseyn + offset(log(nsubjs)), family=poisson)
> summary(f)

Call:
glm(formula = ntrait ~ caseyn + offset(log(nsubjs)), family = poisson)

Deviance Residuals: 
[1]  0  0

Coefficients:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -5.1160     0.4082 -12.532  < 2e-16 ***
caseyn        3.6019     0.5075   7.097 1.27e-12 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

(Dispersion parameter for poisson family taken to be 1)

    Null deviance: 4.5491e+01  on 1  degrees of freedom
Residual deviance: 1.7764e-15  on 0  degrees of freedom
AIC: 11.908

Number of Fisher Scoring iterations: 3

You see that the exponentiated coefficient (exp(3.6019) = 36.667) is the same as the ratio of frequencies of traits in cases versus controls: (6/50)/(11/1000). Using a Poisson assumption on the nature of the count data, we get inference based on that frequency, which of course is "significant at the 0.05 level".

$\endgroup$
3
  • $\begingroup$ Thanks for your help, but I guess I wasn't exactly clear enough. 24 times doesn't necessarily mean that it occurs in 24 of the 1000. I've done a sort of pooled analysis so I actually don't know how many people have the trait i.e. more than one may be in one person $\endgroup$
    – cianius
    Jan 28, 2013 at 1:46
  • 1
    $\begingroup$ I see. Please update the original post to include this information, some biological background would be helpful. For instance, if the counts are the aggregate frequency of a certain mRNA sequence as determined by a tool like mass spectrometry then you will need to use a count model (i.e. Poisson) to test for differences in frequency using the denominator as an offset. $\endgroup$
    – AdamO
    Jan 28, 2013 at 1:52
  • $\begingroup$ I've done that. Apologies for the inefficient initial question. $\endgroup$
    – cianius
    Jan 28, 2013 at 12:55

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.