EXERCISE 1
In a retrospective study aimed at verifying whether coffee consumption influences the risk of myocardial infarction, data were collected on patients residing in a 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 construct my 2x2 contingency table with R.
For this purpose, I need to create a matrix object that contains the data.
In the hypothetical table I’ll create, the columns will represent exposed/non-exposed, and the rows will represent case/control.
The table will be structured 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’s possible to calculate a risk, or better, an Odds Ratio = 1.661566.
EXERCISE 2
We want to assess whether habitual alcohol consumption is a risk factor for liver cirrhosis. Among 130 healthy subjects, 55 were regular alcohol consumers, while among 130 sick subjects, 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 construct the contingency table. The exposed individuals are 55 and 90, so the non-exposed individuals are obtained by subtracting from the totals.
TAB <- matrix(c(90, 55, (130-90), (130-55)), 2) c
hisq.test(TAB, correct=FALSE)
Significant association with p-value < 0.05.
EXERCISE 3
In a study, we want to assess the effectiveness of an innovative antibiotic A compared to the standard antibiotic S in treating an infection I. A sample of 600 subjects with infection I is selected, with 300 treated with A and the other 300 treated with S. After 15 days, 90% of the patients treated with A recovered, and 80% of the subjects treated with S recovered.
Is this a cohort study or a case-control study? (Justify the answer)
Is there an association between the antibiotic used and recovery?
Provide the most informative measure of association for the clinician in relation to the proposed study.
1 - The study is a cohort study. A case-control study is retrospective; in this case, a treatment was administered to a cohort, and the result was then observed.
2 - I construct the contingency table where the exposed A and exposed S groups each contain 300 subjects, with 90% recovered among those exposed to A and 80% recovered among those exposed to S.
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)
Significant association with p-value < 0.05.
OR <- 270 60 / 240 30 = 2.25
EXERCISE 4
A study was conducted to assess the association between contact with herbicides/pesticides and bladder cancer in Scottish Terrier dogs. A total of 57 dogs with cancer (C+) and 109 dogs without cancer (C-) were considered. Among the C+ subjects, 42 had come into contact with herbicides/pesticides, and among the C- subjects, 41 had come into 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)