Hi everyone,
How do I test for confounders in R when I have cohort data and therefore relative risk and not odds ratio?
I'm writing my master's thesis, and I ran into a problem. I want to test if age is a confounder for the risk of being readmitted when you have COPD (chronic obstructive pulmonary disease).
i tried first to make two tables:
kol2= array(c(35,26,30,39,
4,10,7,31),
dim = c(2,2,2),
dimnames = list(
Status=c("COPD", "Not COPD"),
readmitted=c("yes", "no"),
Agegrp=c("Over 64 years", "under 65 years") ) )
output:
Agegrp = Over 64 years
readmitted
Status yes no
COPD 35 30
Not COPD 26 39
Agegrp = under 65 years
readmitted
Status yes no
COPD 4 7
Not COPD 10 31
And then I tried to run mantelhaen.test:
mantelhaen.test(kol2)
Mantel-Haenszel chi-squared test with continuity correction
data: kol2
Mantel-Haenszel X-squared = 2.5651, df = 1, p-value = 0.1092
alternative hypothesis: true common odds ratio is not equal to 1
95 percent confidence interval:
0.9387742 3.2768891
sample estimates:
common odds ratio
1.753927
My question is - does it only works with odds ratios and not relative risk? and if yes, which other tests should I run instead to test for confounders??
Thank you for your time!
Regards
Anna