It would be great if someone could help me out
I would like to know if there is an association between 3 variables, mental health, having a health plan and income level. Below is a contingency table.
> ftable(te)
incomex lt10 lt15 lt20 lt25 lt35 lt50 lt75 mt75
goodmh hlthpln1
FALSE Yes 5458 5164 4992 5234 5110 5953 5692 7832
No 2066 1461 1694 1633 1200 836 441 304
TRUE Yes 12638 15392 21125 27425 35982 49004 55541 104420
No 4307 3961 6197 6536 5729 4911 2944 2437
I was thinking of doing a chi square test, however, I am not sure how this works with an ordinal variable, and more than two variables. I thought a bonferroni correction is needed as well, when you do multiple testing.
I also read about a Cochran–Armitage test for trend.
What test do you think is the best in this situation? And how do you suggest to write this in R?