Exercise 1
In a retrospective study aimed at verifying if coffee consumption influences the risk of myocardial infarction, data was collected on patients residing in a small town. Coffee consumption was classified as low (≤3 cups per day) or high (>3 cups per day). The results are shown in the table.
I will create my 2x2 contingency table in R.
To do this, I need to create a matrix object that contains the data.
In the hypothetical table I will build, the columns represent exposed +/-, and the rows represent case/control.
The table will be as follows:
TAB <- matrix(c(78, 1322, 48, 1352), 2) chisq.test(TAB, correct=FALSE)
The relationship is highly significant, and high coffee consumption is associated with myocardial infarction.
It is possible to calculate a risk or, better yet, an Odds Ratio = 1.661566.
Exercise 2
We want to evaluate if habitual alcohol consumption is a risk factor for liver cirrhosis. Among 130 healthy subjects, 55 were regular alcohol consumers, while among 130 patients with liver cirrhosis, 90 were regular alcohol consumers.
Is there an association between habitual alcohol consumption and liver cirrhosis?
Provide a measure of the strength of association, commenting on the result.
I build the contingency table. The exposed cases are 55 and 90, so the unexposed cases can be derived by subtracting from the totals.
TAB <- matrix(c(90, 55, (130-90), (130-55)), 2) chisq.test(TAB, correct=FALSE)
The association is significant, p-value < 0.05.
Exercise 3
In a study, we aim to evaluate the efficacy of an innovative antibiotic A compared to the standard antibiotic S in treating infection I. A sample of 600 subjects with infection I is selected, 300 of whom are treated with A and the other 300 with S. After 15 days, 90% of patients treated with A are cured, and 80% of patients treated with S are cured.
Is this a cohort study or a case-control study? (justify your answer)
Is there an association between the antibiotic used and recovery?
Provide the most informative measure of association for the clinician regarding the proposed study.
1- The study is a cohort study; a case-control study is retrospective, whereas in this case, a treatment was administered to a cohort and then the result was observed.
2- I build the contingency table where exposed A and exposed S are both 300. Among these, 90% recovered in the A group and 80% in the S group.
A<-300*0.9
B<-300*0.8
C<-300-A
D<-300-B
TAB <- matrix(c(A, C, B, D), 2)
chisq.test(TAB, correct=FALSE)
The association is significant, p-value < 0.05.
OR <- 270 60 / (240 30) = 2.25
Exercise 5
A study was conducted to evaluate the association between contact with herbicides/pesticides and bladder cancer in Scottish Terrier dogs. Fifty-seven dogs with cancer (C+) and 109 dogs without cancer (C-) were considered. Among the C+ subjects, 42 had contact with herbicides/pesticides, and among the C- subjects, 41 had contact with herbicides/pesticides.
Is there evidence of an association between bladder cancer and contact with herbicides/pesticides?
Provide a measure of the strength of association.
A <- 42
B <- 57 - 42
C <- 41
D <- 109 - 41
TAB <- matrix(c(A, C, B, D), 2)
chisq.test(TAB, correct=FALSE)